Documentation ¶
Index ¶
Constants ¶
View Source
const ( OffsetInvalid = klevdb.OffsetInvalid OffsetOldest = klevdb.OffsetOldest OffsetNewest = klevdb.OffsetNewest )
Variables ¶
View Source
var ErrNotFound = klevdb.ErrNotFound
Functions ¶
This section is empty.
Types ¶
type KV ¶
type KV[K comparable, V any] interface { Put(k K, v V) error Del(k K) error Get(k K) (V, error) GetOrDefault(k K, v V) (V, error) GetOrInit(k K, fn func(K) (V, error)) (V, error) Consume(ctx context.Context, offset int64) ([]Message[K, V], int64, error) Snapshot() ([]Message[K, V], int64, error) // TODO this could possible return too much data Close() error }
Click to show internal directories.
Click to hide internal directories.