Documentation
¶
Overview ¶
Package operations tracks external outcomes without executing or retrying work Serialize calls on the owner loop or with a caller-held mutex. Values are immutable snapshots; cost is a caller-supplied logical retained-byte bound
Index ¶
- type Ledger
- func (l *Ledger[T]) Bytes() int
- func (l *Ledger[T]) Get(id string) (Record[T], bool)
- func (l *Ledger[T]) Len() int
- func (l *Ledger[T]) Records(group string) []Record[T]
- func (l *Ledger[T]) Reserve(group string, value T, cost int) (Record[T], error)
- func (l *Ledger[T]) Retire(active map[string]bool) []string
- func (l *Ledger[T]) Update(id string, state State, value T, cost int, pinned bool) error
- type Record
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ledger ¶
type Ledger[T any] struct { // contains filtered or unexported fields }
func (*Ledger[T]) Reserve ¶
Reserve succeeds before the caller submits a new external operation. It never evicts history automatically, including when all retained records are terminal