View Source SpawnSdk.Flow.SideEffect (spawn_sdk v1.3.1)

Actors can also emit side effects to other Actors as part of their response. Side effects do not interfere with an actor's request-response flow. They will "always" be processed asynchronously and any response sent back from the Actor receiving the effect will be ignored by the effector.

Summary

Types

@type action() :: String.t() | atom()
@type actor_name() :: String.t()
@type payload() :: term() | nil
@type t() :: %SpawnSdk.Flow.SideEffect{
  action: String.t() | atom(),
  actor_name: String.t(),
  payload: module(),
  scheduled_to: integer() | nil
}

Functions

Link to this function

effect(list, actor_name, action, payload \\ nil, opts \\ [])

View Source
@spec of() :: [t()]
Link to this function

to(actor_name, action, payload \\ nil, opts \\ [])

View Source
@spec to(actor_name(), action(), payload(), list()) :: t()