Bourse.WS.Dispatch (bourse v0.1.0)

Copy Markdown View Source

Spec-driven channel → handler resolution from websocket.dispatch.entries.

Summary

Functions

Returns dispatch entries from the exchange spec.

Resolves a channel name to a watch family using spec dispatch entries.

Types

resolve_result()

@type resolve_result() :: {:family, atom()} | :system | :not_found

Functions

entries(exchange)

@spec entries(Bourse.Exchange.t()) :: [map()]

Returns dispatch entries from the exchange spec.

resolve_channel(exchange, channel_name)

@spec resolve_channel(Bourse.Exchange.t(), String.t()) :: resolve_result()

Resolves a channel name to a watch family using spec dispatch entries.