ACP.StreamBroadcast (agent_client_protocol v0.1.0)

Copy Markdown View Source

A broadcast mechanism for observing RPC message streams.

Uses a simple GenServer with subscriber tracking. Subscribers receive {:acp_stream, %ACP.StreamMessage{}} messages.

Summary

Functions

Broadcast a stream message to all subscribers.

Returns a specification to start this module under a supervisor.

Broadcast an incoming message.

Broadcast an outgoing message.

Subscribe the calling process to stream messages.

Functions

broadcast(broadcast, message)

Broadcast a stream message to all subscribers.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

incoming(broadcast, content)

Broadcast an incoming message.

outgoing(broadcast, content)

Broadcast an outgoing message.

start_link(opts \\ [])

subscribe(broadcast)

Subscribe the calling process to stream messages.