Documentation
¶
Overview ¶
Package moq provides the MoQ Transport backend provider: a relay serving moq listener and WebTransport sessions from an origin reached over native QUIC or WebTransport, or as the origin itself when it has none.
Index ¶
- Constants
- Variables
- func NativeListenerAdapter() native.Adapter
- func NewClient(name string, o *bo.Options, router http.Handler, c cache.Cache, ...) (backends.Backend, error)
- func QUICConfig(o *mo.ListenerOptions) *quic.Config
- func RetireClients(current backends.Backends)
- func ServesWebTransport(c *config.Config, listenerName string) bool
- func StopClients()
- func WebTransportPath(p string) *po.Options
- type Client
- func (c *Client) Close()
- func (c *Client) DefaultHealthCheckConfig() *ho.Options
- func (c *Client) DefaultPathConfigs(o *bo.Options) po.List
- func (c *Client) HealthCheckProbe() healthcheck.Probe
- func (c *Client) HealthCheckUnsupported() string
- func (c *Client) RegisterHandlers(handlers.Lookup)
- func (c *Client) Relay() *relay.Relay
- func (c *Client) Scope() relay.Scope
Constants ¶
const ( // SchemeMoQT is the URI scheme of a native QUIC MoQ origin SchemeMoQT = "moqt" // SchemeHTTPS is the URI scheme of a WebTransport MoQ origin SchemeHTTPS = "https" )
Variables ¶
var Implementation = "trickster"
Implementation is the MOQT_IMPLEMENTATION Trickster sends, with its version, when a listener names none
Functions ¶
func NativeListenerAdapter ¶
NativeListenerAdapter returns the adapter that serves moq listeners with moq backends
func NewClient ¶
func NewClient(name string, o *bo.Options, router http.Handler, c cache.Cache, _ backends.Backends, _ types.Lookup, ) (backends.Backend, error)
NewClient returns a new MoQ backend Client
func QUICConfig ¶
func QUICConfig(o *mo.ListenerOptions) *quic.Config
QUICConfig returns the transport settings a moq listener needs from the endpoint serving it
func RetireClients ¶
RetireClients commits a configuration's clients: each relay they keep takes their access policy, negative cache TTL and origin alb, and every relay they no longer use is retired, closing once its sessions end
func ServesWebTransport ¶
ServesWebTransport reports whether moq backends use the HTTP listener, so its HTTP/3 endpoint must accept WebTransport sessions
func StopClients ¶
func StopClients()
StopClients closes every relay, ending their sessions; it is called when the process stops
func WebTransportPath ¶
WebTransportPath returns a path that accepts WebTransport sessions at and below p, the only route a moq backend serves on an HTTP listener
Types ¶
type Client ¶
Client implements the MoQ backend provider
func (*Client) Close ¶
func (c *Client) Close()
Close ends the backend's upstream subscriptions and its session toward the origin
func (*Client) DefaultHealthCheckConfig ¶
DefaultHealthCheckConfig returns the protocol-neutral health-check defaults
func (*Client) DefaultPathConfigs ¶
DefaultPathConfigs returns the path that accepts WebTransport sessions on HTTP listeners when the backend configures none, so its configured paths alone decide which sessions it serves
func (*Client) HealthCheckProbe ¶
func (c *Client) HealthCheckProbe() healthcheck.Probe
HealthCheckProbe returns a probe that completes a SETUP exchange with the origin on a fresh session
func (*Client) HealthCheckUnsupported ¶
HealthCheckUnsupported says why a backend with no origin of its own is left unprobed, and is empty for one with an origin; the members of an alb it reaches its origins through are probed as backends of their own
func (*Client) RegisterHandlers ¶
RegisterHandlers registers the handler that accepts WebTransport sessions on HTTP listeners, and the one that reports the backend's health on the metrics listener