Documentation
¶
Index ¶
- Variables
- func Bind[V any, M comparable](handle *Handle[V, M], key incremental.QueryKey, encoded string, ...) error
- func BindMany[V any, M comparable](requests []BindRequest[V, M]) error
- func Materialize[V any, M comparable](handle *Handle[V, M], key incremental.QueryKey, encoded string, ...) (V, error)
- func MetadataMatches[V any, M comparable](handle *Handle[V, M], key incremental.QueryKey, encoded string, ...) error
- func Pending[V any, M comparable](handle *Handle[V, M], key incremental.QueryKey, encoded string, ...) error
- func Take[V any, M comparable](handle *Handle[V, M], key incremental.QueryKey, encoded string, ...) (V, error)
- func TakeMany[V any, M comparable](requests []TakeRequest[V, M]) ([]V, error)
- func Validate[V any, M comparable](handle *Handle[V, M], key incremental.QueryKey, encoded string, ...) error
- type Arena
- type BindRequest
- type Handle
- type InitializeRequest
- type Ref
- func (r *Ref[V, M]) Bind(key incremental.QueryKey, encoded string, ...) error
- func (r *Ref[V, M]) Materialize(key incremental.QueryKey, encoded string, ...) (V, error)
- func (r *Ref[V, M]) MetadataMatches(key incremental.QueryKey, encoded string, ...) error
- func (r *Ref[V, M]) Pending(key incremental.QueryKey, encoded string, ownerRoot incremental.ExactValueRoot) error
- func (r *Ref[V, M]) Take(key incremental.QueryKey, encoded string, ...) (V, error)
- func (r *Ref[V, M]) Validate(key incremental.QueryKey, encoded string, ...) error
- type TakeRequest
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Bind ¶
func Bind[V any, M comparable]( handle *Handle[V, M], key incremental.QueryKey, encoded string, ownerRoot, root incremental.ExactValueRoot, ) error
func BindMany ¶
func BindMany[V any, M comparable](requests []BindRequest[V, M]) error
BindMany binds no slot unless every requested authority and root passes preflight.
func Materialize ¶
func Materialize[V any, M comparable]( handle *Handle[V, M], key incremental.QueryKey, encoded string, ownerRoot, root incremental.ExactValueRoot, clone func(*V) V, ) (V, error)
func MetadataMatches ¶
func MetadataMatches[V any, M comparable]( handle *Handle[V, M], key incremental.QueryKey, encoded string, ownerRoot, root incremental.ExactValueRoot, metadata M, ) error
func Pending ¶
func Pending[V any, M comparable]( handle *Handle[V, M], key incremental.QueryKey, encoded string, ownerRoot incremental.ExactValueRoot, ) error
func Take ¶
func Take[V any, M comparable]( handle *Handle[V, M], key incremental.QueryKey, encoded string, ownerRoot, root incremental.ExactValueRoot, ) (V, error)
func TakeMany ¶
func TakeMany[V any, M comparable](requests []TakeRequest[V, M]) ([]V, error)
TakeMany preflights one arena range before transferring any slot.
func Validate ¶
func Validate[V any, M comparable]( handle *Handle[V, M], key incremental.QueryKey, encoded string, ownerRoot, root incremental.ExactValueRoot, ) error
Types ¶
type Arena ¶
type Arena[V any, M comparable] struct { // contains filtered or unexported fields }
Arena owns a fixed set of independently authenticated result slots.
func (*Arena[V, M]) InitializeOwned ¶
func (a *Arena[V, M]) InitializeOwned( index int, key incremental.QueryKey, encoded string, value V, metadata *M, ) (*Ref[V, M], error)
InitializeOwned transfers value ownership into one exact empty slot.
func (*Arena[V, M]) InitializeOwnedMany ¶
func (a *Arena[V, M]) InitializeOwnedMany( requests []InitializeRequest[V, M], ) ([]*Ref[V, M], error)
InitializeOwnedMany transfers value ownership only after every slot passes preflight.
type BindRequest ¶
type BindRequest[V any, M comparable] struct { Ref *Ref[V, M] Key incremental.QueryKey Encoded string OwnerRoot incremental.ExactValueRoot Root incremental.ExactValueRoot }
BindRequest authenticates one pending or already-bound arena slot.
type Handle ¶
type Handle[V any, M comparable] struct { // contains filtered or unexported fields }
func New ¶
func New[V any, M comparable]( key incremental.QueryKey, encoded string, value V, metadata *M, clone func(*V) V, ) *Handle[V, M]
func NewOwned ¶
func NewOwned[V any, M comparable]( key incremental.QueryKey, encoded string, value V, metadata *M, ) *Handle[V, M]
type InitializeRequest ¶
type InitializeRequest[V any, M comparable] struct { Index int Key incremental.QueryKey Encoded string Value V Metadata *M }
InitializeRequest transfers one value into an exact arena slot.
type Ref ¶
type Ref[V any, M comparable] struct { // contains filtered or unexported fields }
Ref is the authenticated authority stored inside one arena slot.
func (*Ref[V, M]) Bind ¶
func (r *Ref[V, M]) Bind( key incremental.QueryKey, encoded string, ownerRoot, root incremental.ExactValueRoot, ) error
Bind installs the slot's exact root or authenticates an existing binding.
func (*Ref[V, M]) Materialize ¶
func (r *Ref[V, M]) Materialize( key incremental.QueryKey, encoded string, ownerRoot, root incremental.ExactValueRoot, clone func(*V) V, ) (V, error)
Materialize returns a detached clone while the arena retains ownership.
func (*Ref[V, M]) MetadataMatches ¶
func (r *Ref[V, M]) MetadataMatches( key incremental.QueryKey, encoded string, ownerRoot, root incremental.ExactValueRoot, metadata M, ) error
MetadataMatches authenticates optional metadata attached to the slot.
func (*Ref[V, M]) Pending ¶
func (r *Ref[V, M]) Pending( key incremental.QueryKey, encoded string, ownerRoot incremental.ExactValueRoot, ) error
Pending authenticates an initialized slot before it owns an exact root.
func (*Ref[V, M]) Take ¶
func (r *Ref[V, M]) Take( key incremental.QueryKey, encoded string, ownerRoot, root incremental.ExactValueRoot, ) (V, error)
Take transfers slot ownership exactly once.
func (*Ref[V, M]) Validate ¶
func (r *Ref[V, M]) Validate( key incremental.QueryKey, encoded string, ownerRoot, root incremental.ExactValueRoot, ) error
Validate authenticates the ref, its owner root, and its requested root.
type TakeRequest ¶
type TakeRequest[V any, M comparable] struct { Ref *Ref[V, M] Key incremental.QueryKey Encoded string OwnerRoot incremental.ExactValueRoot Root incremental.ExactValueRoot }
TakeRequest identifies one arena slot for an atomic ownership transfer.