View Source SpawnSdk.Flow.SideEffect (spawn_sdk v0.5.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.

Link to this section Summary

Link to this section Types

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

Link to this section Functions

Link to this function

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

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

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

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