Jido.Signal.Bus.Subscriber (Jido v1.1.0-rc.2)

View Source

Defines the subscriber model and subscription management for the signal bus.

This module contains the subscriber type definition and functions for creating, managing, and dispatching signals to subscribers. It supports both regular and persistent subscriptions, handling subscription lifetime and signal delivery.

Summary

Types

t()

@type t() :: %Jido.Signal.Bus.Subscriber{
  created_at: DateTime.t(),
  disconnected?: boolean(),
  dispatch: term(),
  id: String.t(),
  path: String.t(),
  persistence_pid: pid(),
  persistent?: boolean()
}

Functions

dbug(_, _ \\ [])

(macro)

error(_, _ \\ [])

(macro)

subscribe(state, subscription_id, path, opts)

@spec subscribe(Jido.Signal.Bus.State.t(), String.t(), String.t(), keyword()) ::
  {:ok, Jido.Signal.Bus.State.t()} | {:error, Jido.Error.t()}

unsubscribe(state, subscription_id, opts \\ [])

@spec unsubscribe(Jido.Signal.Bus.State.t(), String.t(), keyword()) ::
  {:ok, Jido.Signal.Bus.State.t()} | {:error, Jido.Error.t()}