MOQX.Transport.Profile (moqx v0.8.1)

Copy Markdown View Source

Transport profile fixtures for MOQT-family tests and benchmarks.

A profile describes the ALPN, negotiated transport capabilities, and protocol-level stream expectations that a higher layer may enforce. Profiles are not protocol implementations, and MOQX.Transport does not enforce these stream rules.

The built-in profiles intentionally include the draft version in the atom where the negotiated ALPN includes it.

Summary

Functions

Returns a profile's native QUIC ALPN token.

Returns a profile's normalized transport capabilities.

Returns a profile's normalized transport capabilities, raising on unknown profiles.

Fetches a profile by canonical name or profile struct.

Fetches a profile, raising on unknown profile names.

Returns canonical profile names.

Types

name()

@type name() :: :draft_14 | :draft_16 | :moq_lite_05 | :streams_only

t()

@type t() :: %MOQX.Transport.Profile{
  alpn: binary(),
  capabilities: MOQX.Transport.Capabilities.t(),
  name: name(),
  stream_expectations: map()
}

Functions

alpn(profile)

@spec alpn(name() | t()) :: {:ok, binary()} | {:error, :unknown_profile}

Returns a profile's native QUIC ALPN token.

capabilities(profile)

@spec capabilities(name() | t()) ::
  {:ok, MOQX.Transport.Capabilities.t()} | {:error, :unknown_profile}

Returns a profile's normalized transport capabilities.

capabilities!(profile)

@spec capabilities!(name() | t()) :: MOQX.Transport.Capabilities.t()

Returns a profile's normalized transport capabilities, raising on unknown profiles.

fetch(profile)

@spec fetch(name() | t()) :: {:ok, t()} | {:error, :unknown_profile}

Fetches a profile by canonical name or profile struct.

fetch!(profile)

@spec fetch!(name() | t()) :: t()

Fetches a profile, raising on unknown profile names.

names()

@spec names() :: [name()]

Returns canonical profile names.