cache

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(k []byte) (v []byte)
	Put(k, v []byte)
	Delete(k ...[]byte)
	Close() error
	Range(f func(key []byte, value []byte) bool)
}

func NewMockCache added in v0.3.7

func NewMockCache() Cache

type MockCache added in v0.3.7

type MockCache struct {
	OnPut func(k, v []byte)
}

func (*MockCache) Close added in v0.3.7

func (m *MockCache) Close() error

func (*MockCache) Delete added in v0.3.7

func (m *MockCache) Delete(k ...[]byte)

func (*MockCache) Get added in v0.3.7

func (m *MockCache) Get(k []byte) (v []byte)

func (*MockCache) NewCache added in v0.3.7

func (m *MockCache) NewCache(str string) Cache

func (*MockCache) Put added in v0.3.7

func (m *MockCache) Put(k, v []byte)

func (*MockCache) Range added in v0.3.7

func (m *MockCache) Range(f func(key []byte, value []byte) bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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