cache

package
v0.48.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound      = errors.New("not found")
	ErrUnimplemented = errors.New("unimplemented")
)

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Getter
	Putter
	Deleter
}

Cache groups Getter, Putter and Deleter.

type Deleter

type Deleter interface {
	Delete(key string) error
}

Deleter wraps a method to delete from cache.

type Getter

type Getter interface {
	Get(key string) (interface{}, error)
	GetAll() (map[string]interface{}, error)
}

Getter wraps a method to read from cache.

func MultiGetter

func MultiGetter(getters ...Getter) Getter

MultiGetter combines a list of getters into a single getter.

type Putter

type Putter interface {
	Put(key string, value interface{}) error
}

Putter wraps a method to write to cache.

Directories

Path Synopsis
Package cachetest is a generated GoMock package.
Package cachetest is a generated GoMock package.

Jump to

Keyboard shortcuts

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