ASM.Extensions.PubSub.Topic (ASM v0.9.2)

Copy Markdown View Source

Canonical topic strategy for PubSub event fanout.

Scopes:

  • :all -> asm:events
  • :session -> asm:session:<session_id>
  • :run -> asm:session:<session_id>:run:<run_id>

Summary

Types

scope()

@type scope() :: :all | :session | :run

Functions

all(prefix \\ "asm")

@spec all(String.t()) :: String.t()

default_prefix()

@spec default_prefix() :: String.t()

default_scopes()

@spec default_scopes() :: [scope()]

for_event(event, opts \\ [])

@spec for_event(
  ASM.Event.t(),
  keyword()
) :: {:ok, [String.t()]} | {:error, ASM.Error.t()}

run(session_id, run_id, prefix \\ "asm")

@spec run(String.t(), String.t(), String.t()) :: String.t()

session(session_id, prefix \\ "asm")

@spec session(String.t(), String.t()) :: String.t()