cache

package
v0.18.5 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache added in v0.6.0

type Cache interface {

	// Copy return a copy version of the cache.
	Copy() Cache

	// All return the complete list of the flags.
	All() map[string]flag.Flag

	// Init allow to initialize the cache with a collection of flags.
	Init(flags map[string]flagv1.FlagData)
	// contains filtered or unexported methods
}

Cache is the interface to represent a cache in the system.

type InMemoryCache added in v0.18.4

type InMemoryCache struct {
	Flags map[string]flagv1.FlagData
}

func NewInMemoryCache added in v0.18.4

func NewInMemoryCache() *InMemoryCache

func (*InMemoryCache) All added in v0.18.4

func (fc *InMemoryCache) All() map[string]flag.Flag

func (*InMemoryCache) Copy added in v0.18.4

func (fc *InMemoryCache) Copy() Cache

func (*InMemoryCache) Init added in v0.18.4

func (fc *InMemoryCache) Init(flags map[string]flagv1.FlagData)

type Manager added in v0.18.4

type Manager interface {
	UpdateCache(loadedFlags []byte, fileFormat string) error
	Close()
	GetFlag(key string) (flag.Flag, error)
	AllFlags() (map[string]flag.Flag, error)
}

func New added in v0.6.0

func New(notificationService Service) Manager

type Service added in v0.7.0

type Service interface {
	Close()
	Notify(oldCache map[string]flag.Flag, newCache map[string]flag.Flag)
}

func NewNotificationService added in v0.7.0

func NewNotificationService(notifiers []notifier.Notifier) Service

Jump to

Keyboard shortcuts

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