@@ -28,15 +28,15 @@ var cfLogger = logging.GetLogger("CompositeFeatureService")
28
28
29
29
// CompositeFeatureService is the default out-of-the-box feature decision service
30
30
type CompositeFeatureService struct {
31
- featureExperimentDecisionService ExperimentService
32
- rolloutDecisionService FeatureService
31
+ featureExperimentService ExperimentService
32
+ rolloutDecisionService FeatureService
33
33
}
34
34
35
35
// NewCompositeFeatureService returns a new instance of the CompositeFeatureService
36
36
func NewCompositeFeatureService () * CompositeFeatureService {
37
37
return & CompositeFeatureService {
38
- featureExperimentDecisionService : NewFeatureExperimentService (),
39
- rolloutDecisionService : NewRolloutService (),
38
+ featureExperimentService : NewFeatureExperimentService (),
39
+ rolloutDecisionService : NewRolloutService (),
40
40
}
41
41
}
42
42
@@ -45,15 +45,15 @@ func (f CompositeFeatureService) GetDecision(decisionContext FeatureDecisionCont
45
45
feature := decisionContext .Feature
46
46
47
47
// Check if user is bucketed in feature experiment
48
- if f .featureExperimentDecisionService != nil && len (feature .FeatureExperiments ) > 0 {
48
+ if f .featureExperimentService != nil && len (feature .FeatureExperiments ) > 0 {
49
49
// @TODO: add in a feature decision service that takes into account multiple experiments (via group mutex)
50
50
experiment := feature .FeatureExperiments [0 ]
51
51
experimentDecisionContext := ExperimentDecisionContext {
52
52
Experiment : & experiment ,
53
53
ProjectConfig : decisionContext .ProjectConfig ,
54
54
}
55
55
56
- experimentDecision , err := f .featureExperimentDecisionService .GetDecision (experimentDecisionContext , userContext )
56
+ experimentDecision , err := f .featureExperimentService .GetDecision (experimentDecisionContext , userContext )
57
57
// Variation not nil means we got a decision and should return it
58
58
if experimentDecision .Variation != nil {
59
59
featureDecision := FeatureDecision {
0 commit comments