Documentation
¶
Index ¶
- type MMSegmentStorage
- func (m *MMSegmentStorage) ChangeNumber(segmentName string) (int64, error)
- func (m *MMSegmentStorage) CountRemovedKeys(segmentName string) int64
- 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) KillLocally(splitName string, defaultTreatment string, changeNumber int64)
- func (m *MMSplitStorage) PutMany(splits []dtos.SplitDTO, till int64)
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) CountRemovedKeys ¶
func (m *MMSegmentStorage) CountRemovedKeys(segmentName string) int64
CountRemovedKeys method
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
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() *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) KillLocally ¶
func (m *MMSplitStorage) KillLocally(splitName string, defaultTreatment string, changeNumber int64)
KillLocally kills the split locally
func (*MMSplitStorage) PutMany ¶
func (m *MMSplitStorage) PutMany(splits []dtos.SplitDTO, till int64)
PutMany bulk inserts splits into the in-memory storage
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