optimized

package
v5.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeatureView added in v5.6.0

type FeatureView struct {
	Name            string
	Active          bool
	LastUpdated     int64
	TrafficTypeName string
	FlagSets        []FlagSetView
}

func (*FeatureView) FlagSetNames added in v5.6.0

func (f *FeatureView) FlagSetNames() []string

type FlagSetView added in v5.6.0

type FlagSetView struct {
	Name        string
	Active      bool
	LastUpdated int64
}

type HistoricChanges added in v5.6.0

type HistoricChanges interface {
	GetUpdatedSince(since int64, flagSets []string) []FeatureView
	Update(toAdd []dtos.SplitDTO, toRemove []dtos.SplitDTO, newCN int64)
}

type HistoricChangesImpl added in v5.6.0

type HistoricChangesImpl struct {
	// contains filtered or unexported fields
}

func NewHistoricSplitChanges added in v5.6.0

func NewHistoricSplitChanges(capacity int) *HistoricChangesImpl

func (*HistoricChangesImpl) GetUpdatedSince added in v5.6.0

func (h *HistoricChangesImpl) GetUpdatedSince(since int64, flagSets []string) []FeatureView

func (*HistoricChangesImpl) Update added in v5.6.0

func (h *HistoricChangesImpl) Update(toAdd []dtos.SplitDTO, toRemove []dtos.SplitDTO, newCN int64)

type MySegmentsCache

type MySegmentsCache interface {
	Update(name string, toAdd *set.ThreadUnsafeSet, toRemove *set.ThreadUnsafeSet) error
	SegmentsForUser(key string) []string
	KeyCount() int
}

MySegmentsCache defines the interface for a per-user optimized segment storage

type MySegmentsCacheImpl

type MySegmentsCacheImpl struct {
	// contains filtered or unexported fields
}

MySegmentsCacheImpl implements the MySegmentsCache interface

func NewMySegmentsCache

func NewMySegmentsCache() *MySegmentsCacheImpl

NewMySegmentsCache constructs a new MySegments cache

func (*MySegmentsCacheImpl) KeyCount

func (m *MySegmentsCacheImpl) KeyCount() int

KeyCount retuns the amount of keys who belong to at least one segment

func (*MySegmentsCacheImpl) SegmentsForUser

func (m *MySegmentsCacheImpl) SegmentsForUser(key string) []string

SegmentsForUser returns the list of segments a certain user belongs to

func (*MySegmentsCacheImpl) Update

func (m *MySegmentsCacheImpl) Update(name string, toAdd *set.ThreadUnsafeSet, toRemove *set.ThreadUnsafeSet) error

Update adds and removes segments to keys

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL