clients

package
v0.0.0-...-0621de4 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT 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[K comparable, V any] interface {
	Init(cap int)
	Get(key K) (V, bool)
	Set(key K, value V)
	Name() string
	Close()
	Metrics() string
}

type PebbleCache

type PebbleCache[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func (*PebbleCache[K, V]) Delete

func (n *PebbleCache[K, V]) Delete(key K) error

func (*PebbleCache[K, V]) Get

func (n *PebbleCache[K, V]) Get(key K) (value V, cost int64, expire int64, ok bool, err error)

func (*PebbleCache[K, V]) HandleAsyncError

func (c *PebbleCache[K, V]) HandleAsyncError(err error)

func (*PebbleCache[K, V]) Load

func (c *PebbleCache[K, V]) Load(block *theine.DataBlock) error

func (*PebbleCache[K, V]) SaveData

func (c *PebbleCache[K, V]) SaveData(blockEncoder *gob.Encoder) error

func (*PebbleCache[K, V]) SaveMeta

func (c *PebbleCache[K, V]) SaveMeta(blockEncoder *gob.Encoder) error

func (*PebbleCache[K, V]) Set

func (n *PebbleCache[K, V]) Set(key K, value V, cost int64, expire int64) error

func (*PebbleCache[K, V]) SetClock

func (c *PebbleCache[K, V]) SetClock(clock *clock.Clock)

type TheineMem

type TheineMem[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func (*TheineMem[K, V]) Close

func (c *TheineMem[K, V]) Close()

func (*TheineMem[K, V]) Get

func (c *TheineMem[K, V]) Get(key K) (V, bool)

func (*TheineMem[K, V]) Init

func (c *TheineMem[K, V]) Init(cap int)

func (*TheineMem[K, V]) Name

func (c *TheineMem[K, V]) Name() string

func (*TheineMem[K, V]) Set

func (c *TheineMem[K, V]) Set(key K, value V)

type TheineNvm

type TheineNvm[K comparable, V any] struct {
	KeySerializer   theine.Serializer[K]
	ValueSerializer theine.Serializer[V]
	// contains filtered or unexported fields
}

func (*TheineNvm[K, V]) Close

func (c *TheineNvm[K, V]) Close()

func (*TheineNvm[K, V]) Get

func (c *TheineNvm[K, V]) Get(key K) (V, bool)

func (*TheineNvm[K, V]) Init

func (c *TheineNvm[K, V]) Init(cap int)

func (*TheineNvm[K, V]) Metrics

func (c *TheineNvm[K, V]) Metrics() string

func (*TheineNvm[K, V]) Name

func (c *TheineNvm[K, V]) Name() string

func (*TheineNvm[K, V]) Set

func (c *TheineNvm[K, V]) Set(key K, value V)

type TheinePebble

type TheinePebble[K comparable, V any] struct {
	KeySerializer   theine.Serializer[K]
	ValueSerializer theine.Serializer[V]
	// contains filtered or unexported fields
}

func (*TheinePebble[K, V]) Close

func (c *TheinePebble[K, V]) Close()

func (*TheinePebble[K, V]) Get

func (c *TheinePebble[K, V]) Get(key K) (V, bool)

func (*TheinePebble[K, V]) Init

func (c *TheinePebble[K, V]) Init(cap int)

func (*TheinePebble[K, V]) Metrics

func (c *TheinePebble[K, V]) Metrics() string

func (*TheinePebble[K, V]) Name

func (c *TheinePebble[K, V]) Name() string

func (*TheinePebble[K, V]) Set

func (c *TheinePebble[K, V]) Set(key K, value V)

Jump to

Keyboard shortcuts

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