cache

package
v0.5.1 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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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