Documentation ¶
Index ¶
- Constants
- type Evaluator
- func (e *Evaluator) EvaluateDependency(key string, bucketingKey *string, featureFlag string, ...) string
- func (e *Evaluator) EvaluateFeature(key string, bucketingKey *string, featureFlag string, ...) *Result
- func (e *Evaluator) EvaluateFeatureByFlagSets(key string, bucketingKey *string, flagSets []string, ...) Results
- func (e *Evaluator) EvaluateFeatures(key string, bucketingKey *string, featureFlags []string, ...) Results
- type Interface
- type Result
- type Results
Constants ¶
View Source
const (
// Control is the treatment returned when something goes wrong
Control = "control"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Evaluator ¶
type Evaluator struct {
// contains filtered or unexported fields
}
Evaluator struct is the main evaluator
func NewEvaluator ¶
func NewEvaluator( splitStorage storage.SplitStorageConsumer, segmentStorage storage.SegmentStorageConsumer, eng *engine.Engine, logger logging.LoggerInterface, ) *Evaluator
NewEvaluator instantiates an Evaluator struct and returns a reference to it
func (*Evaluator) EvaluateDependency ¶
func (e *Evaluator) EvaluateDependency(key string, bucketingKey *string, featureFlag string, attributes map[string]interface{}) string
EvaluateDependency SHOULD ONLY BE USED by DependencyMatcher. It's used to break the dependency cycle between matchers and evaluators.
func (*Evaluator) EvaluateFeature ¶
func (e *Evaluator) EvaluateFeature(key string, bucketingKey *string, featureFlag string, attributes map[string]interface{}) *Result
EvaluateFeature returns a struct with the resulting treatment and extra information for the impression
func (*Evaluator) EvaluateFeatureByFlagSets ¶
func (e *Evaluator) EvaluateFeatureByFlagSets(key string, bucketingKey *string, flagSets []string, attributes map[string]interface{}) Results
EvaluateFeatureByFlagSets returns a struct with the resulting treatment and extra information for the impression
type Interface ¶
type Interface interface { EvaluateFeature(key string, bucketingKey *string, featureFlag string, attributes map[string]interface{}) *Result EvaluateFeatures(key string, bucketingKey *string, featureFlags []string, attributes map[string]interface{}) Results EvaluateFeatureByFlagSets(key string, bucketingKey *string, flagSets []string, attributes map[string]interface{}) Results }
Interface should be implemented by concrete treatment evaluator structs
Click to show internal directories.
Click to hide internal directories.