Jido.Messaging.Demo.Topology (Jido Messaging v1.0.0)

Copy Markdown View Source

YAML-backed bootstrap helpers for demo runtime topology.

This module keeps demo setup declarative by loading a topology file and applying bridge configs, rooms, bindings, and routing policies.

Summary

Functions

Resolves an adapter module configured in the topology's bridge section.

Applies bridge configs, rooms, bindings, and routing policies to an instance.

Reads a value from the topology's bridge section.

Loads a YAML topology file and resolves environment placeholders.

Returns the configured demo runtime mode.

Types

summary()

@type summary() :: %{
  bridge_rooms: non_neg_integer(),
  bridge_configs: non_neg_integer(),
  rooms: non_neg_integer(),
  room_bindings: non_neg_integer(),
  routing_policies: non_neg_integer()
}

t()

@type t() :: map()

Functions

adapter_module(topology, key)

@spec adapter_module(t(), String.t()) :: module() | nil

Resolves an adapter module configured in the topology's bridge section.

apply(instance_module, topology)

@spec apply(module(), t()) :: {:ok, summary()} | {:error, term()}

Applies bridge configs, rooms, bindings, and routing policies to an instance.

bridge_value(topology, key)

@spec bridge_value(t(), String.t()) :: term()

Reads a value from the topology's bridge section.

load(path)

@spec load(String.t()) :: {:ok, t()} | {:error, term()}

Loads a YAML topology file and resolves environment placeholders.

mode(topology)

@spec mode(t()) :: :echo | :bridge | :agent | nil

Returns the configured demo runtime mode.