Documentation ¶
Index ¶
- Constants
- type Condition
- type Partition
- type Split
- func (s *Split) Algo() int
- func (s *Split) ChangeNumber() int64
- func (s *Split) Conditions() []*Condition
- func (s *Split) Configurations() map[string]string
- func (s *Split) DefaultTreatment() string
- func (s *Split) Killed() bool
- func (s *Split) Name() string
- func (s *Split) Seed() int64
- func (s *Split) Status() string
- func (s *Split) TrafficAllocation() int
- func (s *Split) TrafficAllocationSeed() int64
Constants ¶
const ( // SplitStatusActive represents an active feature flag SplitStatusActive = "ACTIVE" // SplitStatusArchived represents an archived feature flag SplitStatusArchived = "ARCHIVED" // SplitAlgoLegacy represents the legacy implementation of hash function for bucketing SplitAlgoLegacy = 1 // SplitAlgoMurmur represents the murmur implementation of the hash funcion for bucketing SplitAlgoMurmur = 2 // ConditionTypeWhitelist represents a normal condition ConditionTypeWhitelist = "WHITELIST" // ConditionTypeRollout represents a condition that will return default if traffic allocatio is exceeded ConditionTypeRollout = "ROLLOUT" // MatcherCombinerAnd represents that all matchers in the group are required MatcherCombinerAnd = 0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct {
// contains filtered or unexported fields
}
Condition struct with added logic that wraps around a DTO
func NewCondition ¶
func NewCondition(cond *dtos.ConditionDTO, ctx *injection.Context, logger logging.LoggerInterface) *Condition
NewCondition instantiates a new Condition struct with appropriate wrappers around dtos and returns it.
func (*Condition) CalculateTreatment ¶
CalculateTreatment calulates the treatment for a specific condition based on the bucket
func (*Condition) ConditionType ¶
ConditionType returns validated condition type. Whitelist by default
type Partition ¶
type Partition struct {
// contains filtered or unexported fields
}
Partition struct with added logic that wraps around a DTO
type Split ¶
type Split struct {
// contains filtered or unexported fields
}
Split struct with added logic that wraps around a DTO
func NewSplit ¶
func NewSplit(splitDTO *dtos.SplitDTO, ctx *injection.Context, logger logging.LoggerInterface) *Split
NewSplit instantiates a new Split object and all it's internal structures mapped to model classes
func (*Split) ChangeNumber ¶
ChangeNumber returns the change number for this feature flag
func (*Split) Conditions ¶
Conditions returns a slice of Condition objects
func (*Split) Configurations ¶
Configurations returns the configurations for this feature flag
func (*Split) DefaultTreatment ¶
DefaultTreatment returns the default treatment for the current feature flag
func (*Split) TrafficAllocation ¶
TrafficAllocation returns the traffic allocation configured for the current feature flag
func (*Split) TrafficAllocationSeed ¶
TrafficAllocationSeed returns the seed for traffic allocation configured for this feature flag