Versions in this module Expand all Collapse all v0 v0.5.0 Oct 5, 2026 v0.4.0 Oct 2, 2026 Changes in this version type Store + SetSlotLabel func(ctx context.Context, owner, subject, label string) (Slot, error) v0.3.0 Oct 2, 2026 Changes in this version + var ErrSlotTaken = errors.New("another key holds the owner's slot") + type ClaimRequest struct + Label string + Now time.Time + Owner string + Subject string + type ClaimResult struct + Deleted []Key + Replaced *Slot + Slot Slot type OpenRequest + Owner string + type Slot struct + ClaimedAt time.Time + Label string + Subject string type Store + ClaimSlot func(ctx context.Context, req ClaimRequest) (ClaimResult, error) + DeleteSlot func(ctx context.Context, owner, subject string) ([]Key, error) + GetSlot func(ctx context.Context, owner string) (Slot, bool, error) v0.1.2 Oct 1, 2026 v0.1.1 Sep 30, 2026 v0.1.0 Sep 29, 2026 Changes in this version + const ChangeWindow + const MaxPageSize + const MinPageSize + var ErrFenced = errors.New("lease epoch is stale") + var ErrNotFound = errors.New("database not found") + func BadRequest(format string, args ...any) error + func CheckRange(first, count, pageCount uint64) error + func ValidPageSize(size uint32) bool + func ValidateCommit(pageSize uint32, req CommitRequest) error + type BadRequestError struct + Reason string + func (e *BadRequestError) Error() string + type Block struct + Data []byte + Index uint64 + type ChangeSet struct + Blocks []uint64 + Complete bool + FromVersion uint64 + ToVersion uint64 + type CommitRequest struct + BaseVersion uint64 + Blocks []Block + CommitID []byte + Key Key + LeaseEpoch uint64 + Now time.Time + PageCount uint64 + TTL time.Duration + type DeleteRequest struct + Key Key + Now time.Time + Takeover bool + type DeleteResult struct + Epoch uint64 + Revoked bool + type Key struct + DBID string + Subject string + type Lease struct + Epoch uint64 + ID []byte + type LeaseHeldError struct + Since time.Time + func (e *LeaseHeldError) Error() string + type OpenRequest struct + Create bool + InstanceID []byte + Key Key + Now time.Time + PageSize uint32 + Resume *Resume + TTL time.Duration + Takeover bool + type OpenResult struct + Lease Lease + Revoked bool + State State + type Resume struct + LeaseEpoch uint64 + LeaseID []byte + type State struct + LastCommitID []byte + PageCount uint64 + PageSize uint32 + Version uint64 + type Store interface + Changes func(ctx context.Context, key Key, fromVersion uint64) (ChangeSet, error) + Commit func(ctx context.Context, req CommitRequest) (uint64, error) + Delete func(ctx context.Context, req DeleteRequest) (DeleteResult, error) + DeleteUnused func(ctx context.Context, cutoff time.Time, limit int) ([]Key, error) + Fetch func(ctx context.Context, key Key, version, first, count uint64) ([][]byte, error) + Open func(ctx context.Context, req OpenRequest) (OpenResult, error) + Ping func(ctx context.Context) error + Release func(ctx context.Context, key Key, epoch uint64) error + Renew func(ctx context.Context, key Key, epoch uint64, now time.Time, ttl time.Duration) error + type VersionConflictError struct + Current uint64 + func (e *VersionConflictError) Error() string