ristretto

package
v0.0.0-...-957e270 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Get(key any) (any, bool)
	SetWithTTL(key, value any, cost int64, ttl time.Duration) bool
	Del(key any)
	Wait()
}

type Store

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

func New

func New(client Client) *Store

func (*Store) Codec

func (s *Store) Codec() bool

func (*Store) Delete

func (s *Store) Delete(_ context.Context, key any) (err error)

func (*Store) Get

func (s *Store) Get(_ context.Context, key any) (value any, exists bool, err error)

func (*Store) Set

func (s *Store) Set(_ context.Context, key, value any, options ...icache.StoreOption) (err error)

func (*Store) Type

func (s *Store) Type() string

Jump to

Keyboard shortcuts

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