Crosswake.Bridge.Registry (crosswake v0.1.0)

View Source

Manifest-backed Phase 3 bridge allowlist.

Summary

Functions

allowed_commands()

@spec allowed_commands() :: [String.t()]

command_capability(command)

@spec command_capability(String.t()) :: String.t() | nil

command_supported?(command)

@spec command_supported?(String.t()) :: boolean()

lookup(manifest, route_id, command)

@spec lookup(Crosswake.Manifest.Types.Root.t(), String.t(), String.t()) ::
  {:ok, Crosswake.Bridge.Registry.Entry.t()}
  | {:error, :inactive_route | :unsupported_command | :undeclared_capability}

lookup(manifest, route_id, command, payload)

@spec lookup(Crosswake.Manifest.Types.Root.t(), String.t(), String.t(), map()) ::
  {:ok, Crosswake.Bridge.Registry.Entry.t()}
  | {:error, :inactive_route | :unsupported_command | :undeclared_capability}