keyValue

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func WithExpiration

func WithExpiration(expiration time.Duration) Option

type Options

type Options struct {
	Expiration time.Duration
}

type Store

type Store interface {
	Set(ctx context.Context, key string, value string, opts ...Option) error
	Get(ctx context.Context, key string) (string, error)
	Delete(ctx context.Context, key string) error
}

func NewMemoryStore

func NewMemoryStore() Store

func NewRedisStore

func NewRedisStore() Store

Jump to

Keyboard shortcuts

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