[GitHub] [camel-k-runtime] lburgazzoli opened a new issue #227: add support for routes loaders interceptors

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-k-runtime] lburgazzoli opened a new issue #227: add support for routes loaders interceptors

GitBox
lburgazzoli opened a new issue #227: add support for routes loaders interceptors
URL: https://github.com/apache/camel-k-runtime/issues/227
 
 
   I want to introduce some new parameters to the source definition to define the interceptors that have to be executed while loading a route with methods like:
   
   ```java
   interface RouteLoaderInterceptor {
       /**
        * Invoked before the source is materialized top a RoutesBuilder.
        */
       void beforeLoad(Loader, Source);
       /**
        * Invoked after the source is materialized to a RoutesBuilder and before
        * the builder is added to the runtime.
        */
       void afterLoad(Loader, Source, RoutesBuilder);
   }
   ```
   
   the goal is to be have APIs to implement functionalities such as those provided by the knative-source loader and the cron customizer.
   
   On camel-k side, the source should amended like:
   
   ```go
   type SourceLoaderInterceptorSpec struct {
       // A reference to an existing interceptor loaded through the Java's
       // service loader mechanic
       Ref string  `json:"ref,omitempty"`
       // A full qualified java class name
       Type string  `json:"type,omitempty"`
   }
   type SourceSpec struct {
       DataSpec
       Language Language `json:"language,omitempty"`
       // Loader is an optional id of the org.apache.camel.k.RoutesLoader that will
       // interpret this source at runtime
       Loader string `json:"loader,omitempty"`
       // List of interceptors required by this source
       Interceptors []SourceLoaderInterceptorSpec `json:"interceptors,omitempty"`
   }
   ```
   
   **NOTE**: the knative-loader and cron customizer won't be removed but marked as deprecated.
   
   @nicolaferraro tough ?
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-k-runtime] nicolaferraro commented on issue #227: add support for routes loaders interceptors

GitBox
nicolaferraro commented on issue #227: add support for routes loaders interceptors
URL: https://github.com/apache/camel-k-runtime/issues/227#issuecomment-577750836
 
 
   Sounds good!
   The knative loader is actually not a loader but an interceptor in practice

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-k-runtime] lburgazzoli commented on issue #227: add support for routes loaders interceptors

GitBox
In reply to this post by GitBox
lburgazzoli commented on issue #227: add support for routes loaders interceptors
URL: https://github.com/apache/camel-k-runtime/issues/227#issuecomment-579713904
 
 
   update the `SourceSpec` definition as seems better to use IDs to identify interceptors instead of giving the options to also use the class name

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-k-runtime] lburgazzoli commented on issue #227: add support for routes loaders interceptors

GitBox
In reply to this post by GitBox
lburgazzoli commented on issue #227: add support for routes loaders interceptors
URL: https://github.com/apache/camel-k-runtime/issues/227#issuecomment-579714019
 
 
   requires camel 3.1.x

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-k-runtime] lburgazzoli edited a comment on issue #227: add support for routes loaders interceptors

GitBox
In reply to this post by GitBox
lburgazzoli edited a comment on issue #227: add support for routes loaders interceptors
URL: https://github.com/apache/camel-k-runtime/issues/227#issuecomment-579714019
 
 
   requires camel 3.1.x as it will provides:
   - `RouteBuilder` life-cycle callbacks
   - additional hook to intercept `camel-main` life-cycle events

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-k-runtime] lburgazzoli edited a comment on issue #227: add support for routes loaders interceptors

GitBox
In reply to this post by GitBox
lburgazzoli edited a comment on issue #227: add support for routes loaders interceptors
URL: https://github.com/apache/camel-k-runtime/issues/227#issuecomment-579714019
 
 
   requires camel 3.1.x as it will provides:
   - `RouteBuilder` life-cycle callbacks (https://github.com/apache/camel/pull/3523)
   - additional hook to intercept `camel-main` life-cycle events (https://github.com/apache/camel/pull/3524)
   - options to set duration related events to `camel-main` (https://github.com/apache/camel/pull/3525)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services