store

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiStore

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

func (*MultiStore) Close

func (s *MultiStore) Close()

func (*MultiStore) Del

func (s *MultiStore) Del(ctx context.Context, key ...string) (bool, error)

func (*MultiStore) Get

func (s *MultiStore) Get(ctx context.Context, key string) (string, error)

func (*MultiStore) Set

func (s *MultiStore) Set(ctx context.Context, key string, value string, expiration time.Duration) (bool, error)

type Store

type Store interface {
	Get(ctx context.Context, key string) (string, error)
	Set(ctx context.Context, key string, value string, expiration time.Duration) (bool, error)
	Del(ctx context.Context, key ...string) (bool, error)

	Close()
}

func NewLocalStore

func NewLocalStore(size int) Store

func NewMultiStore

func NewMultiStore(r cache.Cache, size int, channel string) Store

func NewRedisStore

func NewRedisStore(r cache.Cache) Store

Jump to

Keyboard shortcuts

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