Documentation
¶
Index ¶
- Constants
- type APIOptions
- type APIResponse
- type DecisionListener
- type DispatcherType
- type ForcedVariationRequestParams
- type GetEnabledFeaturesRequestParams
- type GetFeatureVariableRequestParams
- type GetVariationRequestParams
- type IsFeatureEnabledRequestParams
- type SDKAPI
- type TrackListener
- type TrackRequestParams
Constants ¶
const EventProcessorDefaultBatchSize = 1
EventProcessorDefaultBatchSize - The default value for event processor batch size
const EventProcessorDefaultFlushInterval = 250 * time.Millisecond
EventProcessorDefaultFlushInterval - The default value for event processor flush interval
const EventProcessorDefaultQueueSize = 1
EventProcessorDefaultQueueSize - The default value for event processor queue size
const KeyDecision = "Decision"
KeyDecision - Key for Decision listener
const KeyListenerCalled = "listener_called"
KeyListenerCalled - Key for listener called
const KeyTrack = "Track"
KeyTrack - Key for Track listener
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIOptions ¶
type APIOptions struct {
DatafileName string
APIName string
Arguments string
Listeners map[string]int
UserProfileServiceType string
UPSMapping map[string]map[string]string
}
APIOptions represents parameters for a scenario
type APIResponse ¶
type APIResponse struct {
Result interface{}
Type entities.VariableType
ListenerCalled []interface{}
}
APIResponse represents result for a scenario
type DecisionListener ¶
type DecisionListener struct {
Type notification.DecisionNotificationType `yaml:"type"`
UserID string `yaml:"user_id"`
Attributes map[string]interface{} `yaml:"attributes"`
DecisionInfo map[string]interface{} `yaml:"decision_info"`
}
DecisionListener represents a decision notification
type DispatcherType ¶
type DispatcherType string
DispatcherType - represents event-dispatcher type
const ( // ProxyEventDispatcher - the event-dispatcher type is proxy ProxyEventDispatcher DispatcherType = "ProxyEventDispatcher" // NoOpEventDispatcher - the event-dispatcher type is no-op NoOpEventDispatcher DispatcherType = "NoopEventDispatcher" )
type ForcedVariationRequestParams ¶
type ForcedVariationRequestParams struct {
ExperimentKey string `yaml:"experiment_key"`
UserID string `yaml:"user_id"`
VariationKey string `yaml:"forced_variation_key,omitempty"`
}
ForcedVariationRequestParams represents params required for Get and Set ForcedVariation API
type GetEnabledFeaturesRequestParams ¶
type GetEnabledFeaturesRequestParams struct {
UserID string `yaml:"user_id"`
Attributes map[string]interface{} `yaml:"attributes"`
}
GetEnabledFeaturesRequestParams represents params required for GetEnabledFeatures API
type GetFeatureVariableRequestParams ¶
type GetFeatureVariableRequestParams struct {
FeatureKey string `yaml:"feature_flag_key"`
VariableKey string `yaml:"variable_key"`
UserID string `yaml:"user_id"`
Attributes map[string]interface{} `yaml:"attributes"`
}
GetFeatureVariableRequestParams represents params required for GetFeatureVariable API's
type GetVariationRequestParams ¶
type GetVariationRequestParams struct {
ExperimentKey string `yaml:"experiment_key"`
UserID string `yaml:"user_id"`
Attributes map[string]interface{} `yaml:"attributes"`
}
GetVariationRequestParams represents params required for GetVariation API
type IsFeatureEnabledRequestParams ¶
type IsFeatureEnabledRequestParams struct {
FeatureKey string `yaml:"feature_flag_key"`
UserID string `yaml:"user_id"`
Attributes map[string]interface{} `yaml:"attributes"`
}
IsFeatureEnabledRequestParams represents params required for IsFeatureEnabled API
type SDKAPI ¶
type SDKAPI string
SDKAPI - represents api's of sdk
const ( // IsFeatureEnabled - the api type is IsFeatureEnabled IsFeatureEnabled SDKAPI = "is_feature_enabled" // GetFeatureVariable - the api type is GetFeatureVariable GetFeatureVariable SDKAPI = "get_feature_variable" // GetFeatureVariableInteger - the api type is GetFeatureVariableInteger GetFeatureVariableInteger SDKAPI = "get_feature_variable_integer" // GetFeatureVariableDouble - the api type is GetFeatureVariableDouble GetFeatureVariableDouble SDKAPI = "get_feature_variable_double" // GetFeatureVariableBoolean - the api type is GetFeatureVariableBoolean GetFeatureVariableBoolean SDKAPI = "get_feature_variable_boolean" // GetFeatureVariableString - the api type is GetFeatureVariableString GetFeatureVariableString SDKAPI = "get_feature_variable_string" // GetEnabledFeatures - the api type is GetEnabledFeatures GetEnabledFeatures SDKAPI = "get_enabled_features" // GetVariation - the api type is GetVariation GetVariation SDKAPI = "get_variation" // Activate - the api type is Activate Activate SDKAPI = "activate" // Track - the api type is Track Track SDKAPI = "track" // SetForcedVariation - the api type is SetForcedVariation SetForcedVariation SDKAPI = "set_forced_variation" // GetForcedVariation - the api type is GetForcedVariation GetForcedVariation SDKAPI = "get_forced_variation" )
type TrackListener ¶
type TrackListener struct {
EventKey string `yaml:"event_key"`
Attributes map[string]interface{} `yaml:"attributes"`
UserID string `yaml:"user_id"`
EventTags map[string]interface{} `yaml:"event_tags"`
}
TrackListener represents a track notification
type TrackRequestParams ¶
type TrackRequestParams struct {
EventKey string `yaml:"event_key"`
UserID string `yaml:"user_id"`
Attributes map[string]interface{} `yaml:"attributes"`
EventTags map[string]interface{} `yaml:"event_tags,omitempty"`
}
TrackRequestParams represents params required for Track API