moq

package
v2.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 72 Imported by: 0

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

View Source
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

View Source
var Implementation = "trickster"

Implementation is the MOQT_IMPLEMENTATION Trickster sends, with its version, when a listener names none

Functions

func NativeListenerAdapter

func NativeListenerAdapter() native.Adapter

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

func RetireClients(current backends.Backends)

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

func ServesWebTransport(c *config.Config, listenerName string) bool

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

func WebTransportPath(p string) *po.Options

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

type Client struct {
	backends.Backend
	// contains filtered or unexported fields
}

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

func (c *Client) DefaultHealthCheckConfig() *ho.Options

DefaultHealthCheckConfig returns the protocol-neutral health-check defaults

func (*Client) DefaultPathConfigs

func (c *Client) DefaultPathConfigs(o *bo.Options) po.List

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

func (c *Client) HealthCheckUnsupported() string

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

func (c *Client) RegisterHandlers(handlers.Lookup)

RegisterHandlers registers the handler that accepts WebTransport sessions on HTTP listeners, and the one that reports the backend's health on the metrics listener

func (*Client) Relay

func (c *Client) Relay() *relay.Relay

Relay returns the relay serving the backend's sessions

func (*Client) Scope

func (c *Client) Scope() relay.Scope

Scope returns the scope every session routed to the backend shares, so its tracks are shared too

Directories

Path Synopsis
Package options provides settings for MoQ Transport backends and listeners.
Package options provides settings for MoQ Transport backends and listeners.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址