cache

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: Apache-2.0 Imports: 9 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.5.0

type Cache struct {
	Caching
}

type Caching added in v0.5.0

type Caching interface {
	Get(name string) (bool, bool)
	GetAll() ([]flag.FeatureFlag, error)
	Refresh(flags []flag.FeatureFlag, intervalAllowed int) error
	ShouldRefreshCache() bool
	Init() error
}

type Memory added in v0.5.0

type Memory struct {
	Flags sync.Map
	// contains filtered or unexported fields
}

func NewMemory added in v0.5.0

func NewMemory() *Memory

func (*Memory) Get added in v0.5.0

func (m *Memory) Get(name string) (bool, bool)

func (*Memory) GetAll added in v0.5.0

func (m *Memory) GetAll() ([]flag.FeatureFlag, error)

func (*Memory) Init added in v0.5.0

func (m *Memory) Init() error

func (*Memory) Refresh added in v0.5.0

func (m *Memory) Refresh(flags []flag.FeatureFlag, intervalAllowed int) error

func (*Memory) ShouldRefreshCache added in v0.5.0

func (m *Memory) ShouldRefreshCache() bool

type SQLLite added in v0.5.0

type SQLLite struct {
	Flags []flag.FeatureFlag

	FileName *string
	DB       *sql.DB
}

func NewSQLLite added in v0.5.0

func NewSQLLite(filename *string) *SQLLite

func (*SQLLite) Get added in v0.5.0

func (s *SQLLite) Get(name string) (bool, bool)

func (*SQLLite) GetAll added in v0.5.0

func (s *SQLLite) GetAll() ([]flag.FeatureFlag, error)

func (*SQLLite) Init added in v0.5.0

func (s *SQLLite) Init() error

func (*SQLLite) Refresh added in v0.5.0

func (s *SQLLite) Refresh(flags []flag.FeatureFlag, intervalAllowed int) error

func (*SQLLite) ShouldRefreshCache added in v0.5.0

func (s *SQLLite) ShouldRefreshCache() bool

type System

type System struct {
	Context context.Context

	FileName *string
	IsMemory bool

	CacheSystem Caching
}

func NewSystem

func NewSystem() *System

func (*System) NewMemory added in v0.5.0

func (s *System) NewMemory()

func (*System) NewSQLLite added in v0.5.0

func (s *System) NewSQLLite()

func (*System) SetContext

func (s *System) SetContext(ctx context.Context)

func (*System) SetFileName added in v0.4.2

func (s *System) SetFileName(fileName *string)

Jump to

Keyboard shortcuts

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