Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheStorage ¶
type CacheStorage interface { EntryStore Get(ctx context.Context, key string) ([]byte, error) Set(ctx context.Context, key string, value []byte) error Close() }
func NewInMemoryStorage ¶
func NewInMemoryStorage() CacheStorage
type Entry ¶
type Entry struct { VariationID string `json:"i"` Value interface{} `json:"v"` Type int `json:"t"` RolloutRules []*RolloutRule `json:"r"` PercentageRules []*PercentageRule `json:"p"` }
type EntryStore ¶
type EntryStore interface { LoadEntry() *EntryWithEtag ComposeBytes() []byte StoreEntry(data []byte, fetchTime time.Time, eTag string) }
func NewEntryStore ¶
func NewEntryStore() EntryStore
type EntryWithEtag ¶
type Notifier ¶
type Notifier interface { Close() Closed() <-chan struct{} Notify() Modified() <-chan struct{} }
func NewNotifier ¶
func NewNotifier() Notifier
type NotifyingStorage ¶
type NotifyingStorage interface { CacheStorage Notifier }
type PercentageRule ¶
type Preferences ¶
type RolloutRule ¶
Click to show internal directories.
Click to hide internal directories.