Documentation ¶
Index ¶
- type LargeSegmentsStorageImpl
- func (s *LargeSegmentsStorageImpl) ChangeNumber(name string) int64
- func (s *LargeSegmentsStorageImpl) Count() int
- func (s *LargeSegmentsStorageImpl) IsInLargeSegment(name string, key string) (bool, error)
- func (s *LargeSegmentsStorageImpl) LargeSegmentsForUser(userKey string) []string
- func (s *LargeSegmentsStorageImpl) SetChangeNumber(name string, till int64)
- func (s *LargeSegmentsStorageImpl) TotalKeys(name string) int
- func (s *LargeSegmentsStorageImpl) Update(name string, userKeys []string, till int64)
- type MMSegmentStorage
- func (m *MMSegmentStorage) ChangeNumber(segmentName string) (int64, error)
- func (m *MMSegmentStorage) Keys(segmentName string) *set.ThreadUnsafeSet
- func (m *MMSegmentStorage) SegmentContainsKey(segmentName string, key string) (bool, error)
- func (m *MMSegmentStorage) SegmentKeysCount() int64
- func (m *MMSegmentStorage) SetChangeNumber(name string, till int64) error
- func (m *MMSegmentStorage) Update(name string, toAdd *set.ThreadUnsafeSet, toRemove *set.ThreadUnsafeSet, ...) error
- type MMSplitStorage
- func (m *MMSplitStorage) All() []dtos.SplitDTO
- func (m *MMSplitStorage) ChangeNumber() (int64, error)
- func (m *MMSplitStorage) FetchMany(splitNames []string) map[string]*dtos.SplitDTO
- func (m *MMSplitStorage) GetAllFlagSetNames() []string
- func (m *MMSplitStorage) GetNamesByFlagSets(sets []string) map[string][]string
- func (m *MMSplitStorage) KillLocally(splitName string, defaultTreatment string, changeNumber int64)
- func (m *MMSplitStorage) LargeSegmentNames() *set.ThreadUnsafeSet
- func (m *MMSplitStorage) Remove(splitName string)
- func (m *MMSplitStorage) SegmentNames() *set.ThreadUnsafeSet
- func (m *MMSplitStorage) SetChangeNumber(till int64) error
- func (m *MMSplitStorage) Split(splitName string) *dtos.SplitDTO
- func (m *MMSplitStorage) SplitNames() []string
- func (m *MMSplitStorage) TrafficTypeExists(trafficType string) bool
- func (m *MMSplitStorage) Update(toAdd []dtos.SplitDTO, toRemove []dtos.SplitDTO, till int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LargeSegmentsStorageImpl ¶ added in v6.0.2
type LargeSegmentsStorageImpl struct {
// contains filtered or unexported fields
}
LargeSegmentsStorageImpl implements the LargeSegmentsStorage interface
func NewLargeSegmentsStorage ¶ added in v6.0.2
func NewLargeSegmentsStorage() *LargeSegmentsStorageImpl
NewLargeSegmentsStorage constructs a new LargeSegments cache
func (*LargeSegmentsStorageImpl) ChangeNumber ¶ added in v6.0.2
func (s *LargeSegmentsStorageImpl) ChangeNumber(name string) int64
func (*LargeSegmentsStorageImpl) Count ¶ added in v6.0.2
func (s *LargeSegmentsStorageImpl) Count() int
Count retuns the amount of Large Segments
func (*LargeSegmentsStorageImpl) IsInLargeSegment ¶ added in v6.0.2
func (s *LargeSegmentsStorageImpl) IsInLargeSegment(name string, key string) (bool, error)
func (*LargeSegmentsStorageImpl) LargeSegmentsForUser ¶ added in v6.0.2
func (s *LargeSegmentsStorageImpl) LargeSegmentsForUser(userKey string) []string
SegmentsForUser returns the list of segments a certain user belongs to
func (*LargeSegmentsStorageImpl) SetChangeNumber ¶ added in v6.0.2
func (s *LargeSegmentsStorageImpl) SetChangeNumber(name string, till int64)
func (*LargeSegmentsStorageImpl) TotalKeys ¶ added in v6.0.2
func (s *LargeSegmentsStorageImpl) TotalKeys(name string) int
type MMSegmentStorage ¶
type MMSegmentStorage struct {
// contains filtered or unexported fields
}
MMSegmentStorage contains is an in-memory implementation of segment storage
func NewMMSegmentStorage ¶
func NewMMSegmentStorage() *MMSegmentStorage
NewMMSegmentStorage instantiates a new MMSegmentStorage
func (*MMSegmentStorage) ChangeNumber ¶
func (m *MMSegmentStorage) ChangeNumber(segmentName string) (int64, error)
ChangeNumber returns the latest timestamp the segment was fetched
func (*MMSegmentStorage) Keys ¶
func (m *MMSegmentStorage) Keys(segmentName string) *set.ThreadUnsafeSet
Keys retrieves a segment from the in-memory storage NOTE: A pointer TO A COPY is returned, in order to avoid race conditions between evaluations and sdk <-> backend sync
func (*MMSegmentStorage) SegmentContainsKey ¶
func (m *MMSegmentStorage) SegmentContainsKey(segmentName string, key string) (bool, error)
SegmentContainsKey returns true if the segment contains a specific key
func (*MMSegmentStorage) SegmentKeysCount ¶
func (m *MMSegmentStorage) SegmentKeysCount() int64
SegmentKeysCount returns the total number of cached segment keys
func (*MMSegmentStorage) SetChangeNumber ¶
func (m *MMSegmentStorage) SetChangeNumber(name string, till int64) error
SetChangeNumber sets the till value belong to segmentName
func (*MMSegmentStorage) Update ¶
func (m *MMSegmentStorage) Update(name string, toAdd *set.ThreadUnsafeSet, toRemove *set.ThreadUnsafeSet, till int64) error
Update adds a new segment to the in-memory storage
type MMSplitStorage ¶
type MMSplitStorage struct {
// contains filtered or unexported fields
}
MMSplitStorage struct contains is an in-memory implementation of split storage
func NewMMSplitStorage ¶
func NewMMSplitStorage(flagSetFilter flagsets.FlagSetFilter) *MMSplitStorage
NewMMSplitStorage instantiates a new MMSplitStorage
func (*MMSplitStorage) All ¶
func (m *MMSplitStorage) All() []dtos.SplitDTO
All returns a list with a copy of each split. NOTE: This method will block any further operations regarding splits. Use with caution
func (*MMSplitStorage) ChangeNumber ¶
func (m *MMSplitStorage) ChangeNumber() (int64, error)
ChangeNumber returns the last timestamp the split was fetched
func (*MMSplitStorage) FetchMany ¶
func (m *MMSplitStorage) FetchMany(splitNames []string) map[string]*dtos.SplitDTO
FetchMany fetches features in redis and returns an array of split dtos
func (*MMSplitStorage) GetAllFlagSetNames ¶
func (m *MMSplitStorage) GetAllFlagSetNames() []string
func (*MMSplitStorage) GetNamesByFlagSets ¶
func (m *MMSplitStorage) GetNamesByFlagSets(sets []string) map[string][]string
GetNamesByFlagSets grabs all the feature flags linked to the passed sets
func (*MMSplitStorage) KillLocally ¶
func (m *MMSplitStorage) KillLocally(splitName string, defaultTreatment string, changeNumber int64)
KillLocally kills the split locally
func (*MMSplitStorage) LargeSegmentNames ¶ added in v6.0.2
func (m *MMSplitStorage) LargeSegmentNames() *set.ThreadUnsafeSet
LargeSegmentNames returns a slice with the names of all large segments referenced in splits
func (*MMSplitStorage) Remove ¶
func (m *MMSplitStorage) Remove(splitName string)
Remove deletes a split from the in-memory storage
func (*MMSplitStorage) SegmentNames ¶
func (m *MMSplitStorage) SegmentNames() *set.ThreadUnsafeSet
SegmentNames returns a slice with the names of all segments referenced in splits
func (*MMSplitStorage) SetChangeNumber ¶
func (m *MMSplitStorage) SetChangeNumber(till int64) error
SetChangeNumber sets the till value belong to split
func (*MMSplitStorage) Split ¶
func (m *MMSplitStorage) Split(splitName string) *dtos.SplitDTO
Split retrieves a split from the MMSplitStorage NOTE: A pointer TO A COPY is returned, in order to avoid race conditions between evaluations and sdk <-> backend sync
func (*MMSplitStorage) SplitNames ¶
func (m *MMSplitStorage) SplitNames() []string
SplitNames returns a slice with the names of all the current splits
func (*MMSplitStorage) TrafficTypeExists ¶
func (m *MMSplitStorage) TrafficTypeExists(trafficType string) bool
TrafficTypeExists returns true or false depending on existence and counter of trafficType