Versions in this module Expand all Collapse all v0 v0.6.0 Dec 4, 2026 v0.5.0 Dec 2, 2026 Changes in this version + const DefaultMaxLifetime + const Key + const MaxAddressBytes + const MaxPathBytes + const MaxTokenBytes + var ErrDial = errors.New("plugin endpoint connection failed") + var ErrExpired = errors.New("plugin endpoint expired") + var ErrUsed = errors.New("plugin endpoint token already used") + type Endpoint struct + Address string + ExpiresAt time.Time + OneTime bool + Path string + Scheme string + Token string + func Decode(raw json.RawMessage) (Endpoint, error) + func (e Endpoint) Check() error + func (e Endpoint) Format(f fmt.State, _ rune) + func (e Endpoint) GoString() string + func (e Endpoint) String() string + func (e Endpoint) Validate(p Policy) error + type Grant struct + func Admit(session Lifetime, e Endpoint, p Policy) (*Grant, error) + func (g *Grant) Active() bool + func (g *Grant) AuthorizationHeader() (string, error) + func (g *Grant) DialTCP(ctx context.Context) (net.Conn, error) + func (g *Grant) Format(f fmt.State, _ rune) + func (g *Grant) GoString() string + func (g *Grant) Revoke() + func (g *Grant) Scheme() string + func (g *Grant) String() string + func (g *Grant) Target() (scheme, address, path string, err error) + func (g *Grant) Token() (string, error) + type Lifetime interface + Done func() <-chan struct{} + type Policy struct + MaxLifetime time.Duration + Now func() time.Time + Schemes []string