memory

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type Service

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

func New

func New() *Service

func (*Service) Close

func (s *Service) Close() error

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, keys ...string) error

func (*Service) DeletePattern

func (s *Service) DeletePattern(ctx context.Context, pattern string) error

func (*Service) Exists

func (s *Service) Exists(ctx context.Context, key string) bool

func (*Service) Flush

func (s *Service) Flush(ctx context.Context) (string, error)

func (*Service) Get

func (s *Service) Get(ctx context.Context, key string, dest any) error

func (*Service) GetBytes

func (s *Service) GetBytes(ctx context.Context, key string) ([]byte, error)

func (*Service) GetFloat

func (s *Service) GetFloat(ctx context.Context, key string) (float64, error)

func (*Service) GetInt

func (s *Service) GetInt(ctx context.Context, key string) (int, error)

func (*Service) GetString

func (s *Service) GetString(ctx context.Context, key string) (string, error)

func (*Service) Keys

func (s *Service) Keys(ctx context.Context, pattern string) ([]string, error)

func (*Service) Set

func (s *Service) Set(ctx context.Context, key string, v any, expire time.Duration) error

func (*Service) StartExpirationController

func (s *Service) StartExpirationController()

Jump to

Keyboard shortcuts

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