Versions in this module Expand all Collapse all v7 v7.0.0 Sep 26, 2025 Changes in this version + const DefaultScanCount + const ErrorHashNotPresent + const FieldException + const FieldExceptionIndexMachineIP + const FieldExceptionIndexMachineName + const FieldExceptionIndexMethod + const FieldExceptionIndexSdkVersion + const FieldLatency + const FieldLatencyIndexBucket + const FieldLatencyIndexMachineIP + const FieldLatencyIndexMachineName + const FieldLatencyIndexMethod + const FieldLatencyIndexSdkVersion + const FieldSeparator + const InitHashFields + const KeyAPIKeyHash + const KeyConfig + const KeyEvents + const KeyException + const KeyFlagSet + const KeyImpressionsCount + const KeyImpressionsQueue + const KeyInit + const KeyLatency + const KeyRuleBasedSegment + const KeyRuleBasedSegmentTill + const KeySegment + const KeySegmentTill + const KeySplit + const KeySplitTill + const KeyTrafficType + const KeyUniquekeys + const TTLConfig + const TTLImpressions + const TTLUniquekeys + const TelemetryConfigIndexMachineIP + const TelemetryConfigIndexMachineName + const TelemetryConfigIndexSdkVersion + var ErrChangeNumberUpdateFailed = errors.New("failed to update change number") + var ErrClusterInvalidHashtag = errors.New("hashtag must be wrapped in '{', '}', and be at least 3 characters long") + var ErrInvalidConf = errors.New(...) + var ErrSentinelNoMaster = errors.New("Missing redis sentinel master name") + func NewImpressionStorage(client *redis.PrefixedRedisClient, metadata dtos.Metadata, ...) storage.ImpressionStorage + func NewImpressionsCountStorage(client *redis.PrefixedRedisClient, logger logging.LoggerInterface) storage.ImpressionsCountStorage + func NewRedisClient(config *conf.RedisConfig, logger logging.LoggerInterface) (*redis.PrefixedRedisClient, error) + func NewSegmentStorage(redisClient *redis.PrefixedRedisClient, logger logging.LoggerInterface) storage.SegmentStorage + func NewTelemetryStorage(redisClient *redis.PrefixedRedisClient, logger logging.LoggerInterface, ...) storage.TelemetryRedisProducer + func NewUniqueKeysMultiSdkConsumer(redisClient *redis.PrefixedRedisClient, logger logging.LoggerInterface) storage.UniqueKeysMultiSdkConsumer + type EventsStorage struct + func NewEventStorageConsumer(redisClient *redis.PrefixedRedisClient, metadata dtos.Metadata, ...) *EventsStorage + func NewEventsStorage(redisClient *redis.PrefixedRedisClient, metadata dtos.Metadata, ...) *EventsStorage + func (r *EventsStorage) Count() int64 + func (r *EventsStorage) Drop(size int64) error + func (r *EventsStorage) Empty() bool + func (r *EventsStorage) PopNRaw(n int64) ([]string, int64, error) + func (r *EventsStorage) PopNWithMetadata(n int64) ([]dtos.QueueStoredEventDTO, error) + func (r *EventsStorage) Push(event dtos.EventDTO, _ int) error + type ImpressionStorage struct + func (r *ImpressionStorage) Count() int64 + func (r *ImpressionStorage) Drop(size int64) error + func (r *ImpressionStorage) Empty() bool + func (r *ImpressionStorage) LogImpressions(impressions []dtos.Impression) error + func (r *ImpressionStorage) PopN(n int64) ([]dtos.Impression, error) + func (r *ImpressionStorage) PopNRaw(n int64) ([]string, int64, error) + func (r *ImpressionStorage) PopNWithMetadata(n int64) ([]dtos.ImpressionQueueObject, error) + type ImpressionsCountStorageImp struct + func (r *ImpressionsCountStorageImp) GetImpressionsCount() (*dtos.ImpressionsCountDTO, error) + func (r *ImpressionsCountStorageImp) RecordImpressionsCount(impressions dtos.ImpressionsCountDTO) error + type MiscStorage struct + func NewMiscStorage(client *redis.PrefixedRedisClient, logger logging.LoggerInterface) *MiscStorage + func (m *MiscStorage) ClearAll() error + func (m *MiscStorage) GetApikeyHash() (string, error) + func (m *MiscStorage) SetApikeyHash(newApikeyHash string) error + type RuleBasedSegmentStorage struct + func NewRuleBasedStorage(redisClient *redis.PrefixedRedisClient, logger logging.LoggerInterface) *RuleBasedSegmentStorage + func (r *RuleBasedSegmentStorage) ChangeNumber() (int64, error) + func (r *RuleBasedSegmentStorage) GetRuleBasedSegmentByName(ruleBased string) *dtos.RuleBasedSegmentDTO + type SegmentStorage struct + func (r *SegmentStorage) ChangeNumber(segmentName string) (int64, error) + func (r *SegmentStorage) Keys(segmentName string) *set.ThreadUnsafeSet + func (r *SegmentStorage) SegmentContainsKey(segmentName string, key string) (bool, error) + func (r *SegmentStorage) SegmentKeysCount() int64 + func (r *SegmentStorage) SetChangeNumber(segmentName string, changeNumber int64) error + func (r *SegmentStorage) Size(name string) (int, error) + func (r *SegmentStorage) Update(name string, toAdd *set.ThreadUnsafeSet, toRemove *set.ThreadUnsafeSet, ...) error + func (r *SegmentStorage) UpdateWithSummary(name string, toAdd *set.ThreadUnsafeSet, toRemove *set.ThreadUnsafeSet, ...) (int, int, error) + type SegmentUpdateError struct + FailureToAdd error + FailureToRemove error + func (s *SegmentUpdateError) Error() string + type SplitStorage struct + func NewSplitStorage(redisClient *redis.PrefixedRedisClient, logger logging.LoggerInterface, ...) *SplitStorage + func (r *SplitStorage) All() []dtos.SplitDTO + func (r *SplitStorage) ChangeNumber() (int64, error) + func (r *SplitStorage) FetchMany(features []string) map[string]*dtos.SplitDTO + func (r *SplitStorage) GetAllFlagSetNames() []string + func (r *SplitStorage) GetNamesByFlagSets(sets []string) map[string][]string + func (r *SplitStorage) KillLocally(splitName string, defaultTreatment string, changeNumber int64) + func (r *SplitStorage) LargeSegmentNames() *set.ThreadUnsafeSet + func (r *SplitStorage) SegmentNames() *set.ThreadUnsafeSet + func (r *SplitStorage) SetChangeNumber(changeNumber int64) error + func (r *SplitStorage) Split(feature string) *dtos.SplitDTO + func (r *SplitStorage) SplitNames() []string + func (r *SplitStorage) TrafficTypeExists(trafficType string) bool + func (r *SplitStorage) Update(toAdd []dtos.SplitDTO, toRemove []dtos.SplitDTO, changeNumber int64) + func (r *SplitStorage) UpdateWithErrors(toAdd []dtos.SplitDTO, toRemove []dtos.SplitDTO, changeNumber int64) error + type TelemetryStorage struct + func (t *TelemetryStorage) RecordBURTimeout() + func (t *TelemetryStorage) RecordConfigData(configData dtos.Config) error + func (t *TelemetryStorage) RecordException(method string) + func (t *TelemetryStorage) RecordLatency(method string, latency time.Duration) + func (t *TelemetryStorage) RecordNonReadyUsage() + func (t *TelemetryStorage) RecordUniqueKeys(uniques dtos.Uniques) error + type UniqueKeysMultiSdkConsumer struct + func (u *UniqueKeysMultiSdkConsumer) Count() int64 + func (u *UniqueKeysMultiSdkConsumer) PopNRaw(n int64) ([]string, int64, error) + type UpdateError struct + FailedToAdd map[string]error + FailedToRemove map[string]error + func (u *UpdateError) Error() string Other modules containing this package github.com/splitio/go-split-commons/v2 github.com/splitio/go-split-commons/v3 github.com/splitio/go-split-commons/v4 github.com/splitio/go-split-commons/v5 github.com/splitio/go-split-commons/v6 github.com/splitio/go-split-commons/v8