AshJido.SensorDispatchBridge (AshJido v1.0.0)

Copy Markdown View Source

Helper for forwarding dispatched signals to a Jido.Sensor.Runtime process.

Summary

Functions

Forwards a dispatched signal message to a sensor runtime.

Forwards many signal messages and returns a summary of successes and failures.

Forwards a signal message and treats non-signal mailbox noise as ignored.

Types

forward_error()

@type forward_error() :: :invalid_signal_message | :runtime_unavailable

forward_many_result()

@type forward_many_result() :: %{
  forwarded: non_neg_integer(),
  errors: [%{message: term(), reason: forward_error()}]
}

Functions

forward(message, sensor_runtime)

@spec forward(term(), Jido.Sensor.Runtime.server()) :: :ok | {:error, forward_error()}

Forwards a dispatched signal message to a sensor runtime.

Accepts raw %Jido.Signal{} structs and the wrapped signal message shapes commonly received from Jido dispatch targets.

forward_many(messages, sensor_runtime)

@spec forward_many([term()], Jido.Sensor.Runtime.server()) :: forward_many_result()

Forwards many signal messages and returns a summary of successes and failures.

forward_or_ignore(message, sensor_runtime)

@spec forward_or_ignore(term(), Jido.Sensor.Runtime.server()) ::
  :ok | :ignored | {:error, :runtime_unavailable}

Forwards a signal message and treats non-signal mailbox noise as ignored.