datastore

package
v0.0.0-...-5292f58 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Closer

type Closer interface {
	Close() error
}

Closer is a datastore that can be closed commit changes and cleanup any pending resources.

type Deleter

type Deleter interface {
	Delete(key string) error
}

Deleter is a datastore that implements a simple way to delete values.

type Getter

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

Getter is a datastore that implements a simple way to get values.

type MultiDeleter

type MultiDeleter interface {
	Deleter
	DeleteAll(keys []string) error
	DeleteWithPrefix(prefix string) error
}

MultiDeleter is a datastore that implements methods that delete multiple keys at once.

type MultiGetter

type MultiGetter interface {
	Getter
	GetWithRange(from string, to string) ([]string, [][]byte, error)
	GetWithPrefix(prefix string) ([]string, [][]byte, error)
}

MultiGetter is a datastore that implements methods that get multiple keys at once.

type MultiGetterSetterDeleterCloser

type MultiGetterSetterDeleterCloser interface {
	MultiGetter
	TTLSetter
	MultiDeleter
	Closer
}

MultiGetterSetterDeleterCloser combines MultiGetter, TTLSetter, MultiDeleter, and Closer.

type Setter

type Setter interface {
	Set(key string, value string) error
}

Setter is a datastore that implements a simple way to set values.

type TTLSetter

type TTLSetter interface {
	Setter
	SetWithTTL(key string, value string, ttl time.Duration) error
}

TTLSetter is a datastore that implements a setter with a TTL. The set key and value should be purged form the datastore once the TTL expires.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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