Documentation
¶
Overview ¶
Package kv is the small durable key-value store used for agent metadata: alert state, log offsets, bundle state, key manifest sequence, cursors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("kv: not found")
ErrNotFound is returned by helpers that require a key.
Functions ¶
Types ¶
type Bolt ¶
type Bolt struct {
// contains filtered or unexported fields
}
Bolt is a Store backed by one bbolt bucket.
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory is an in-memory Store for tests and ephemeral use.
type Store ¶
type Store interface {
Get(key string) ([]byte, bool, error)
Put(key string, value []byte) error
Delete(key string) error
// ForEach visits keys with prefix in ascending order.
ForEach(prefix string, fn func(key string, value []byte) error) error
// Batch applies puts (nil value deletes) atomically.
Batch(ops map[string][]byte) error
}
Store is a durable key-value namespace. Writes are durable when they return.
Click to show internal directories.
Click to hide internal directories.