Documentation ¶
Index ¶
- Constants
- func Bucket(latency int64) int
- func GetStreamingEvent(eventType int, data int64) *dtos.StreamingEvent
- func IsMethodValid(method *string) bool
- func ParseMethodFromRedisHash(method string) (normalized string, ok bool)
- type InitConfig
- type NoOp
- type RecorderSingle
- type SynchronizerRedis
- type TelemetrySynchronizer
Constants ¶
const ( // Treatment getTreatment Treatment = "treatment" // Treatments getTreatments Treatments = "treatments" // TreatmentWithConfig getTreatmentWithConfig TreatmentWithConfig = "treatmentWithConfig" // TreatmentsWithConfig getTreatmentsWithConfig TreatmentsWithConfig = "treatmentsWithConfig" // TreatmentsByFlagSet getTreatmentsByFlagSet TreatmentsByFlagSet = "treatmentsByFlagSet" // TreatmentsByFlagSets getTreatmentsByFlagSets TreatmentsByFlagSets = "treatmentsByFlagSets" // TreatmentsWithConfigByFlagSet getTreatmentsWithConfigByFlagSet TreatmentsWithConfigByFlagSet = "treatmentsWithConfigByFlagSet" // TreatmentsWithConfigByFlagSets getTreatmentsWithConfigByFlagSets TreatmentsWithConfigByFlagSets = "treatmentsWithConfigByFlagSets" // Track track Track = "track" )
const ( // SplitSync splitChanges SplitSync = iota // SegmentSync segmentChanges SegmentSync // ImpressionSync impressions ImpressionSync // ImpressionCountSync impressionsCount ImpressionCountSync // EventSync events EventSync // TelemetrySync telemetry TelemetrySync // TokenSync auth TokenSync )
const ( // ImpressionsDropped dropped ImpressionsDropped = iota // ImpressionsDeduped deduped ImpressionsDeduped // ImpressionsQueued queued ImpressionsQueued )
const ( // EventsDropped dropped EventsDropped = iota // EventsQueued queued EventsQueued )
const ( // LatencyBucketCount Max buckets LatencyBucketCount = 23 // MaxStreamingEvents Max streaming events allowed MaxStreamingEvents = 20 // MaxTags Max tags MaxTags = 10 )
const ( EventTypeSSEConnectionEstablished = iota * 10 EventTypeOccupancyPri EventTypeOccupancySec EventTypeStreamingStatus EventTypeConnectionError EventTypeTokenRefresh EventTypeAblyError EventTypeSyncMode )
const ( StreamingDisabled = iota StreamingEnabled StreamingPaused )
const ( Requested = iota NonRequested )
const ( Streaming = iota Polling )
const ( Standalone = iota Consumer Producer )
const ( ImpressionsModeOptimized = iota ImpressionsModeDebug ImpressionsModeNone )
const ( Redis = "redis" Memory = "memory" )
const (
SplitUpdate = iota
)
Variables ¶
This section is empty.
Functions ¶
func GetStreamingEvent ¶
func GetStreamingEvent(eventType int, data int64) *dtos.StreamingEvent
GetStreamingEvent get streaming event
func IsMethodValid ¶
IsMethodValid returs true if the supplied method name is valid
func ParseMethodFromRedisHash ¶
ParseMethodFromRedisHash parses the method in a latency/exception hash from redis and returns it's normalized version, or `ok` set to false
Types ¶
type InitConfig ¶
type InitConfig struct { AdvancedConfig conf.AdvancedConfig TaskPeriods conf.TaskPeriods ImpressionsMode string ListenerEnabled bool FlagSetsTotal int64 FlagSetsInvalid int64 }
InitConfig involves entire config for init
type RecorderSingle ¶
type RecorderSingle struct {
// contains filtered or unexported fields
}
RecorderSingle struct for telemetry sync
func (*RecorderSingle) SynchronizeConfig ¶
func (e *RecorderSingle) SynchronizeConfig(cfg InitConfig, timedUntilReady int64, factoryInstances map[string]int64, tags []string)
SynchronizeConfig syncs telemetry config
func (*RecorderSingle) SynchronizeStats ¶
func (e *RecorderSingle) SynchronizeStats() error
SynchronizeStats syncs telemetry stats
func (*RecorderSingle) SynchronizeUniqueKeys ¶
func (e *RecorderSingle) SynchronizeUniqueKeys(uniques dtos.Uniques) error
SynchronizeUniqueKeys syncs unique keys
type SynchronizerRedis ¶
type SynchronizerRedis struct {
// contains filtered or unexported fields
}
SynchronizerRedis struct
func (*SynchronizerRedis) SynchronizeConfig ¶
func (r *SynchronizerRedis) SynchronizeConfig(cfg InitConfig, timedUntilReady int64, factoryInstances map[string]int64, tags []string)
SynchronizeConfig syncs config
func (*SynchronizerRedis) SynchronizeStats ¶
func (r *SynchronizerRedis) SynchronizeStats() error
SynchronizeStats no-op
func (*SynchronizerRedis) SynchronizeUniqueKeys ¶
func (r *SynchronizerRedis) SynchronizeUniqueKeys(uniques dtos.Uniques) error
SynchronizeUniqueKeys syncs unique keys
type TelemetrySynchronizer ¶
type TelemetrySynchronizer interface { SynchronizeConfig(cfg InitConfig, timedUntilReady int64, factoryInstances map[string]int64, tags []string) SynchronizeStats() error SynchronizeUniqueKeys(uniques dtos.Uniques) error }
TelemetrySynchronizer interface
func NewSynchronizerRedis ¶
func NewSynchronizerRedis(storage storage.TelemetryConfigProducer, logger logging.LoggerInterface) TelemetrySynchronizer
NewSynchronizerRedis constructor
func NewTelemetrySynchronizer ¶
func NewTelemetrySynchronizer( telemetryStorage storage.TelemetryStorageConsumer, telemetryRecorder service.TelemetryRecorder, splitStorage storage.SplitStorageConsumer, segmentStorage storage.SegmentStorageConsumer, logger logging.LoggerInterface, metadata dtos.Metadata, runtimeTelemetry storage.TelemetryRuntimeProducer, ) TelemetrySynchronizer
NewTelemetrySynchronizer creates new event synchronizer for posting events