Documentation ¶
Index ¶
- type DataDropper
- type EventMultiSdkConsumer
- type EventStorageConsumer
- type EventStorageProducer
- type EventsStorage
- type Filter
- type ImpressionMultiSdkConsumer
- type ImpressionStorage
- type ImpressionStorageConsumer
- type ImpressionStorageProducer
- type ImpressionsCountConsumer
- type ImpressionsCountProducer
- type ImpressionsCountStorage
- type SegmentStorage
- type SegmentStorageConsumer
- type SegmentStorageProducer
- type SplitStorage
- type SplitStorageConsumer
- type SplitStorageProducer
- type TelemetryConfigConsumer
- type TelemetryConfigProducer
- type TelemetryEvaluationConsumer
- type TelemetryEvaluationProducer
- type TelemetryPeeker
- type TelemetryRedisProducer
- type TelemetryRuntimeConsumer
- type TelemetryRuntimeProducer
- type TelemetryStorage
- type TelemetryStorageConsumer
- type TelemetryStorageProducer
- type UniqueKeysMultiSdkConsumer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataDropper ¶
DataDropper interface is used by dependants who need to drop data from a collection
type EventMultiSdkConsumer ¶
type EventMultiSdkConsumer interface { Count() int64 PopNRaw(int64) ([]string, int64, error) PopNWithMetadata(n int64) ([]dtos.QueueStoredEventDTO, error) }
EventMultiSdkConsumer defines the methods required to consume events from a stored shared by many sdks
type EventStorageConsumer ¶
EventStorageConsumer interface should be implemented by structs that offer popping impressions
type EventStorageProducer ¶
EventStorageProducer interface should be implemented by structs that accept incoming events
type EventsStorage ¶
type EventsStorage interface { EventStorageConsumer EventStorageProducer }
EventsStorage wraps consumer and producer interfaces
type ImpressionMultiSdkConsumer ¶
type ImpressionMultiSdkConsumer interface { Count() int64 PopNRaw(int64) ([]string, int64, error) PopNWithMetadata(n int64) ([]dtos.ImpressionQueueObject, error) }
ImpressionMultiSdkConsumer defines the methods required to consume impressions from a stored shared by many sdks
type ImpressionStorage ¶
type ImpressionStorage interface { ImpressionStorageConsumer ImpressionStorageProducer ImpressionMultiSdkConsumer }
ImpressionStorage wraps consumer & producer interfaces
type ImpressionStorageConsumer ¶
type ImpressionStorageConsumer interface { Empty() bool PopN(n int64) ([]dtos.Impression, error) }
ImpressionStorageConsumer interface should be implemented by structs that offer popping impressions
type ImpressionStorageProducer ¶
type ImpressionStorageProducer interface {
LogImpressions(impressions []dtos.Impression) error
}
ImpressionStorageProducer interface should be impemented by structs that accept incoming impressions
type ImpressionsCountConsumer ¶
type ImpressionsCountConsumer interface {
GetImpressionsCount() (*dtos.ImpressionsCountDTO, error)
}
ImpressionsCountProducer interface
type ImpressionsCountProducer ¶
type ImpressionsCountProducer interface {
RecordImpressionsCount(impressions dtos.ImpressionsCountDTO) error
}
ImpressionsCountProducer interface
type ImpressionsCountStorage ¶
type ImpressionsCountStorage interface { ImpressionsCountConsumer ImpressionsCountProducer }
type SegmentStorage ¶
type SegmentStorage interface { SegmentStorageProducer SegmentStorageConsumer }
SegmentStorage wraps consumer and producer interfaces
type SegmentStorageConsumer ¶
type SegmentStorageConsumer interface { ChangeNumber(segmentName string) (int64, error) Keys(segmentName string) *set.ThreadUnsafeSet SegmentContainsKey(segmentName string, key string) (bool, error) SegmentKeysCount() int64 }
SegmentStorageConsumer interface should be implemented by all structs that ofer reading segments
type SegmentStorageProducer ¶
type SegmentStorageProducer interface { Update(name string, toAdd *set.ThreadUnsafeSet, toRemove *set.ThreadUnsafeSet, changeNumber int64) error SetChangeNumber(segmentName string, till int64) error }
SegmentStorageProducer interface should be implemented by all structs that offer writing segments
type SplitStorage ¶
type SplitStorage interface { ChangeNumber() (int64, error) Update(toAdd []dtos.SplitDTO, toRemove []dtos.SplitDTO, changeNumber int64) KillLocally(splitName string, defaultTreatment string, changeNumber int64) SetChangeNumber(changeNumber int64) error All() []dtos.SplitDTO FetchMany(splitNames []string) map[string]*dtos.SplitDTO SegmentNames() *set.ThreadUnsafeSet // Not in Spec Split(splitName string) *dtos.SplitDTO SplitNames() []string TrafficTypeExists(trafficType string) bool GetNamesByFlagSets(sets []string) map[string][]string GetAllFlagSetNames() []string }
SplitStorage wraps consumer & producer interfaces Note: Since go's interface composition does not (yet) support interface method overlap, extracting a common subset (.ChangeNumber()), embedding it in Both consumer & Producer, and then having a wide interface that embeds both (diamond composition), results in a compilation error. The only workaround so far is to explicitly define all the methods that make up the composed interface
type SplitStorageConsumer ¶
type SplitStorageConsumer interface { ChangeNumber() (int64, error) All() []dtos.SplitDTO FetchMany(splitNames []string) map[string]*dtos.SplitDTO SegmentNames() *set.ThreadUnsafeSet // Not in Spec Split(splitName string) *dtos.SplitDTO SplitNames() []string TrafficTypeExists(trafficType string) bool GetNamesByFlagSets(sets []string) map[string][]string GetAllFlagSetNames() []string }
SplitStorageConsumer should be implemented by structs that offer reading splits from storage
type SplitStorageProducer ¶
type SplitStorageProducer interface { ChangeNumber() (int64, error) Update(toAdd []dtos.SplitDTO, toRemove []dtos.SplitDTO, changeNumber int64) KillLocally(splitName string, defaultTreatment string, changeNumber int64) SetChangeNumber(changeNumber int64) error }
SplitStorageProducer should be implemented by structs that offer writing splits in storage
type TelemetryConfigConsumer ¶
TelemetryConfigConsumer interface for config data
type TelemetryConfigProducer ¶
type TelemetryConfigProducer interface { RecordConfigData(configData dtos.Config) error RecordNonReadyUsage() RecordBURTimeout() RecordUniqueKeys(uniques dtos.Uniques) error }
TelemetryConfigProducer interface for config data
type TelemetryEvaluationConsumer ¶
type TelemetryEvaluationConsumer interface { PopLatencies() dtos.MethodLatencies PopExceptions() dtos.MethodExceptions }
TelemetryEvaluationConsumer for evaluation
type TelemetryEvaluationProducer ¶
type TelemetryEvaluationProducer interface { RecordLatency(method string, latency time.Duration) RecordException(method string) }
TelemetryEvaluationProducer for evaluation
type TelemetryPeeker ¶
type TelemetryPeeker interface { PeekHTTPLatencies(resource int) []int64 PeekHTTPErrors(resource int) map[int]int }
TelemetryPeeker interface
type TelemetryRedisProducer ¶
type TelemetryRedisProducer interface { TelemetryConfigProducer TelemetryEvaluationProducer }
TelemetryRedisProducer interface redis
type TelemetryRuntimeConsumer ¶
type TelemetryRuntimeConsumer interface { GetImpressionsStats(dataType int) int64 GetEventsStats(dataType int) int64 GetLastSynchronization() dtos.LastSynchronization PopHTTPErrors() dtos.HTTPErrors PopHTTPLatencies() dtos.HTTPLatencies PopAuthRejections() int64 PopTokenRefreshes() int64 PopStreamingEvents() []dtos.StreamingEvent PopTags() []string GetSessionLength() int64 PopUpdatesFromSSE() dtos.UpdatesFromSSE }
TelemetryRuntimeConsumer for runtime stats
type TelemetryRuntimeProducer ¶
type TelemetryRuntimeProducer interface { AddTag(tag string) RecordImpressionsStats(dataType int, count int64) RecordEventsStats(dataType int, count int64) RecordSuccessfulSync(resource int, when time.Time) RecordSyncError(resource int, status int) RecordSyncLatency(resource int, latency time.Duration) RecordAuthRejections() RecordTokenRefreshes() RecordStreamingEvent(streamingEvent *dtos.StreamingEvent) RecordSessionLength(session int64) RecordUpdatesFromSSE(updateType int) }
TelemetryRuntimeProducer for runtime stats
type TelemetryStorage ¶
type TelemetryStorage interface { TelemetryStorageConsumer TelemetryStorageProducer }
TelemetryStorage wraps consumer and producer interfaces
type TelemetryStorageConsumer ¶
type TelemetryStorageConsumer interface { TelemetryConfigConsumer TelemetryEvaluationConsumer TelemetryRuntimeConsumer }
TelemetryStorageConsumer interface should be implemented by structs that offer popping telemetry
type TelemetryStorageProducer ¶
type TelemetryStorageProducer interface { TelemetryConfigProducer TelemetryEvaluationProducer TelemetryRuntimeProducer }
TelemetryStorageProducer interface should be implemented by struct that accepts incoming telemetry