lburgazzoli commented on a change in pull request #1274: Refactoring traits to 
allow addons and add master trait (as addon)
URL: https://github.com/apache/camel-k/pull/1274#discussion_r379820706
 
 

 ##########
 File path: pkg/trait/trait_types.go
 ##########
 @@ -95,40 +95,49 @@ type Trait interface {
 
        // RequiresIntegrationPlatform indicates that the trait cannot work 
without an integration platform set
        RequiresIntegrationPlatform() bool
+
+       // IsAllowedInProfile tels if the trait supports the given profile
+       IsAllowedInProfile(v1.TraitProfile) bool
+
+       // Order is the order in which the trait should be executed in the 
normal flow
+       Order() int
 }
 
 /* Base trait */
 
-func newBaseTrait(id string) BaseTrait {
+// NewBaseTrait --
+func NewBaseTrait(id string, order int) BaseTrait {
 
 Review comment:
   LGTM, so as future step we could think to generalize this pattern as is 
exactly the same we are using for the builder so we should probably come up 
with a sort of a reusable finite step machine framework

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to