v3

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvironmentAPIKeyEvictionInterval = 10 * time.Second
)

Variables

This section is empty.

Functions

func NewRedisCache

func NewRedisCache(client redis.Client) cache.MultiGetDeleteCountCache

Types

type AutoOpsRulesCache added in v0.4.0

type AutoOpsRulesCache interface {
	Get(environmentNamespace string) (*aoproto.AutoOpsRules, error)
	Put(autoOps *aoproto.AutoOpsRules, environmentNamespace string) error
}

func NewAutoOpsRulesCache added in v0.4.0

func NewAutoOpsRulesCache(c cache.MultiGetCache) AutoOpsRulesCache

type EnvironmentAPIKeyCache

type EnvironmentAPIKeyCache interface {
	Get(string) (*accountproto.EnvironmentAPIKey, error)
	Put(*accountproto.EnvironmentAPIKey) error
}

func NewEnvironmentAPIKeyCache

func NewEnvironmentAPIKeyCache(c cache.Cache) EnvironmentAPIKeyCache

type EventCounterCache added in v0.2.0

type EventCounterCache interface {
	GetEventCounts(keys []string) ([]float64, error)
	GetEventCountsV2(keys [][]string) ([]float64, error)
	GetUserCount(key string) (int64, error)
	GetUserCounts(keys []string) ([]float64, error)
	GetUserCountsV2(keys []string) ([]float64, error)
	MergeMultiKeys(dest string, keys []string) error
	DeleteKey(key string) error
	UpdateUserCount(key, userID string) error
}

func NewEventCountCache added in v0.2.0

func NewEventCountCache(c cache.MultiGetDeleteCountCache) EventCounterCache

type ExperimentsCache

type ExperimentsCache interface {
	Get(environmentNamespace string) (*exproto.Experiments, error)
	Put(experiments *exproto.Experiments, environmentNamespace string) error
}

func NewExperimentsCache

func NewExperimentsCache(c cache.MultiGetCache) ExperimentsCache

type FeaturesCache

type FeaturesCache interface {
	Get(environmentNamespace string) (*featureproto.Features, error)
	Put(features *featureproto.Features, environmentNamespace string) error
}

func NewFeaturesCache

func NewFeaturesCache(c cache.MultiGetCache) FeaturesCache

type InMemoryCache added in v0.4.0

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

func NewInMemoryCache added in v0.4.0

func NewInMemoryCache(opts ...InMemoryCacheOption) *InMemoryCache

func (*InMemoryCache) Destroy added in v0.4.0

func (c *InMemoryCache) Destroy()

func (*InMemoryCache) Get added in v0.4.0

func (c *InMemoryCache) Get(key interface{}) (interface{}, error)

func (*InMemoryCache) Put added in v0.4.0

func (c *InMemoryCache) Put(key, value interface{}, expiration time.Duration) error

type InMemoryCacheOption added in v0.4.0

type InMemoryCacheOption func(*InMemoryCache)

func WithEvictionInterval added in v0.4.0

func WithEvictionInterval(evictionInterval time.Duration) InMemoryCacheOption

type SegmentUsersCache

type SegmentUsersCache interface {
	Get(segmentID, environmentNamespace string) (*featureproto.SegmentUsers, error)
	GetAll(environmentNamespace string) ([]*featureproto.SegmentUsers, error)
	Put(segmentUsers *featureproto.SegmentUsers, environmentNamespace string) error
}

func NewSegmentUsersCache

func NewSegmentUsersCache(c cache.MultiGetCache) SegmentUsersCache

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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