storage

package
v0.0.0-...-0687549 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValueStore

type KeyValueStore[K any, V any] interface {
	Get(ctx context.Context, key K) (V, error)

	Set(ctx context.Context, key K, value V) error

	Delete(ctx context.Context, key K) error
}

func NewEtcdStore

func NewEtcdStore[V any](kv clientv3.KV, marshaller Marshaller, unmarshaller Unmarshaller) KeyValueStore[string, V]

func NewMemoryStore

func NewMemoryStore[K comparable, V any]() KeyValueStore[K, V]

type Marshaller

type Marshaller func(v any) ([]byte, error)

type Unmarshaller

type Unmarshaller func([]byte, any) error

Jump to

Keyboard shortcuts

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