Documentation
¶
Overview ¶
Package nodeauthority binds boot-local source capabilities to durable placement. It installs no routes and owns lease-expiry timers, never source retirement.
Index ¶
- Variables
- type Authority
- func (a *Authority) Acquire(ctx context.Context, s nodesource.Scope) (nodesource.Hold, error)
- func (a *Authority) Bind(ctx context.Context, s nodesource.Scope, h *playback.SourceHandle, size int64) (Handle, error)
- func (a *Authority) CheckLocal(ctx context.Context, p nodesource.Peer, key string) error
- func (a *Authority) GoString() string
- func (a *Authority) Issue(ctx context.Context, h Handle, expiry time.Time) (Lease, error)
- func (a *Authority) Renew(ctx context.Context, h Handle, old nodesource.Grant, expiry time.Time) (Lease, error)
- func (a *Authority) Resolve(ctx context.Context, peer nodesource.Peer, stable string) (Handle, nodesource.Scope, int64, error)
- func (a *Authority) Revoke(h Handle) error
- func (*Authority) String() string
- func (a *Authority) Verify(ctx context.Context, p nodesource.Peer, key string) (nodesource.Grant, error)
- type Handle
- type Lease
- type Lookup
- type Options
Constants ¶
This section is empty.
Variables ¶
var ErrCapacity = errors.New("nodeauthority: capacity exhausted")
var ErrDenied = errors.New("nodeauthority: denied")
Functions ¶
This section is empty.
Types ¶
type Authority ¶
type Authority struct {
// contains filtered or unexported fields
}
func (*Authority) Acquire ¶
func (a *Authority) Acquire(ctx context.Context, s nodesource.Scope) (nodesource.Hold, error)
Acquire is installed only on the private nodesource handler, which checks Peer and bearer via Verify. It independently checks live binding authority before retaining the exact SourceHandle under playback's manager barrier.
func (*Authority) Bind ¶
func (a *Authority) Bind(ctx context.Context, s nodesource.Scope, h *playback.SourceHandle, size int64) (Handle, error)
Bind accepts only an already captured local handle, never a URL or path. Size and revision must equal the handle's canonical trusted capture. Failed binds consume no slot; successful binds consume one for this authority's entire boot.
func (*Authority) CheckLocal ¶
CheckLocal checks revocation and monotonic lease expiry without durable I/O. It supplements Verify during an already admitted streaming request.
func (*Authority) Renew ¶
func (a *Authority) Renew(ctx context.Context, h Handle, old nodesource.Grant, expiry time.Time) (Lease, error)
Renew accepts only the current bearer; a successful replay cannot create more grants. Old bearers remain valid only until their original immutable expiry.
func (*Authority) Resolve ¶
func (a *Authority) Resolve(ctx context.Context, peer nodesource.Peer, stable string) (Handle, nodesource.Scope, int64, error)
Resolve is trusted host composition for immutable Start.Grant values. The caller supplies the authenticated intended worker identity; no wire endpoint is installed. Success does not issue a bearer or establish retirement proof.
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
Handle is the immutable Start.Grant identity, distinct from a bearer.
type Lease ¶
type Lease struct {
// contains filtered or unexported fields
}
Lease redacts ordinary formatting. Transport explicitly exports its Grant.
func (Lease) Grant ¶
func (l Lease) Grant() nodesource.Grant
type Options ¶
type Options struct {
// ClockReady gates binds and minting (including renewal), never existing reads.
ClockReady func() bool
Lookup Lookup
Policy func(context.Context, placement.Target, nodesource.Scope) error
Owner placement.Target
Now func() time.Time
ClockBoundKnown bool
ClockSkew, MaxLifetime time.Duration
MaxBindings, MaxGrants, MaxGrantsPerBinding int
}
Options are trusted host configuration. Policy checks current viewer/source rights, controller and target membership/boots, and target transcode eligibility. ClockBoundKnown asserts synchronized local/DB/worker clocks with absolute pairwise skew <= ClockSkew, including drift over MaxLifetime. Unknown fails closed.