memory

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryStore

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

MemoryStore implements the Store interface using in-memory storage It provides thread-safe operations using sync.RWMutex

func NewStore

func NewStore() *MemoryStore

NewMemoryStore creates a new in-memory store

func (*MemoryStore) Close

func (m *MemoryStore) Close() error

Close cleanly shuts down the store

func (*MemoryStore) Delete

func (m *MemoryStore) Delete(ctx context.Context, key string) error

Delete removes a feature flag

func (*MemoryStore) Get

func (m *MemoryStore) Get(ctx context.Context, key string) (*core.FeatureFlag, error)

Get retrieves a feature flag by key

func (*MemoryStore) GetAll

func (m *MemoryStore) GetAll(ctx context.Context) ([]core.FeatureFlag, error)

GetAll retrieves all feature flags

func (*MemoryStore) HealthCheck

func (m *MemoryStore) HealthCheck(ctx context.Context) error

HealthCheck verifies store connectivity (always healthy for memory store)

func (*MemoryStore) Set

func (m *MemoryStore) Set(ctx context.Context, flag core.FeatureFlag) error

Set creates or updates a feature flag

Jump to

Keyboard shortcuts

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