Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeatureFlagProcessor ¶
type FeatureFlagProcessor interface { // Run the processor to poll the latest cache from the server Run() // Close tears down all Processor activities, after ensuring that all events have been delivered. Close() }
FeatureFlagProcessor defines the interface for processing feature flags cache.
In the background, the Processor polls the latest feature flags from the server, and updates them in the local cache.
func NewFeatureFlagProcessor ¶
func NewFeatureFlagProcessor(conf *FeatureFlagProcessorConfig) FeatureFlagProcessor
type FeatureFlagProcessorConfig ¶
type FeatureFlagProcessorConfig struct { // Cache Cache cache.Cache // PollingInterval is a interval of polling feature flags from the server PollingInterval time.Duration // APIClient is the client for Bucketeer service. APIClient api.Client // PushLatencyMetricsEvent pushes the get evaluation latency metrics event to the queue. PushLatencyMetricsEvent func(duration time.Duration, api model.APIID) // PushSizeMetricsEvent pushes the get evaluation size metrics event to the queue. PushSizeMetricsEvent func(sizeByte int, api model.APIID) // Push error metric events to Bucketeer service PushErrorEvent func(err error, api model.APIID) // Loggers is the Bucketeer SDK Loggers. Loggers *log.Loggers // Tag is the Feature Flag tag // The tag is set when a Feature Flag is created, and can be retrieved from the admin console. Tag string }
ProcessorConfig is the config for Processor.
type SegmentUserProcessor ¶
type SegmentUserProcessor interface { // Run the processor to poll the latest cache from the server Run() // Close tears down all Processor activities, after ensuring that all events have been delivered. Close() }
SegmentUserProcessor defines the interface for processing segment users cache.
In the background, the Processor polls the latest segment users from the server, and updates them in the local cache.
func NewSegmentUserProcessor ¶
func NewSegmentUserProcessor(conf *SegmentUserProcessorConfig) SegmentUserProcessor
type SegmentUserProcessorConfig ¶
type SegmentUserProcessorConfig struct { // Cache Cache cache.Cache // PollingInterval is a interval of polling segment users from the server PollingInterval time.Duration // APIClient is the client for Bucketeer service. APIClient api.Client // PushLatencyMetricsEvent pushes the get evaluation latency metrics event to the queue. PushLatencyMetricsEvent func(duration time.Duration, api model.APIID) // PushSizeMetricsEvent pushes the get evaluation size metrics event to the queue. PushSizeMetricsEvent func(sizeByte int, api model.APIID) // PushErrorEvent pushes error metric events to Bucketeer service PushErrorEvent func(err error, api model.APIID) // Loggers is the Bucketeer SDK Loggers. Loggers *log.Loggers // Tag is the Feature Flag tag // The tag is set when a Feature Flag is created, and can be retrieved from the admin console. // // Note: this tag is used to report metric events. Tag string }
ProcessorConfig is the config for Processor.
Click to show internal directories.
Click to hide internal directories.