Documentation
¶
Overview ¶
Package capacityledger accounts for retained capacity without choosing admission, eviction, or scheduling policy. A domain owner serializes a ledger tree and all its holds with the same lock it uses for those decisions. This keeps allocation, cache pinning, and reclamation atomic without adding another lock to the hot path.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hold ¶
type Hold struct {
// contains filtered or unexported fields
}
Hold is a copy-safe claim on already charged capacity. Copies share ownership; Transfer invalidates every old copy without briefly making capacity available. All methods follow the ledger owner's serialization contract.
func (Hold) Grow ¶
Grow meters a logical operation cumulatively, so a directory scan or a cache need not allocate an ownership record for every increment.
type Ledger ¶
type Ledger struct {
// contains filtered or unexported fields
}
Ledger must not be copied after first use. Related ledgers use one owner lock.
type UnreleasedError ¶
UnreleasedError is a snapshot, not a revocation of live ownership. Late cleanup can still release its holds after admission has closed.
func (*UnreleasedError) Error ¶
func (e *UnreleasedError) Error() string