Documentation
¶
Index ¶
- type Backend
- func (b *Backend[K, V]) Close(context.Context) error
- func (b *Backend[K, V]) Delete(ctx context.Context, key K) error
- func (b *Backend[K, V]) Flush(context.Context) error
- func (b *Backend[K, V]) Get(ctx context.Context, key K) (V, bool, error)
- func (b *Backend[K, V]) List(ctx context.Context, pageSize *int, pageToken *K) (iter.Seq2[K, V], *K, error)
- func (b *Backend[K, V]) Set(ctx context.Context, key K, value V) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend[K comparable, V any] struct { // contains filtered or unexported fields }
func NewBackend ¶
func NewBackend[K comparable, V any]() *Backend[K, V]
NewBackend creates a new in-memory storage backend, which uses a slice to store entries.
Click to show internal directories.
Click to hide internal directories.