Documentation
¶
Overview ¶
Package controlsession defines the nonsecret, immutable identity persisted with a run. Possession tokens and transport admission belong elsewhere.
Index ¶
Constants ¶
const ( MinLeaseDuration = time.Second MaxLeaseDuration = 5 * time.Minute )
const ProtocolVersion uint32 = 3
ProtocolVersion requires both channel binding and control lease enforcement. It is independent of the guest WASI ABI and the public HTTP API version.
Variables ¶
This section is empty.
Functions ¶
func NewIncarnation ¶
Types ¶
type Binding ¶
Binding identifies one session in one dispatcher incarnation. Both fields must be canonical lowercase, nonzero UUID strings. The value has no token.
func NewBinding ¶
func ParseBinding ¶
type EndError ¶
EndError contains only a previously sanitized cause. Transport code must remove reflected credentials before retaining a peer error here.
type EndKind ¶
type EndKind uint8
EndKind selects session retry policy independently of peer error text.
const ( LeaseExpired ParentStopped IncompatibleProfile LocalFailure )
type LeaseTiming ¶
type LeaseTiming struct {
Duration time.Duration
RenewInterval time.Duration
RequestTimeout time.Duration
WatchdogInterval time.Duration
}
LeaseTiming is a validated value copied into one control session. These durations bound local admission and stop signals, not remote quiescence.
func LeaseTimingFromMillis ¶
func LeaseTimingFromMillis(milliseconds int64) (LeaseTiming, error)
LeaseTimingFromMillis validates before multiplication, including signed wire values which would otherwise overflow time.Duration.
func NewLeaseTiming ¶
func NewLeaseTiming(duration time.Duration) (LeaseTiming, error)