View Source SpawnSdk.Flow.SideEffect (spawn_sdk v2.0.0-RC4)

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

action()

@type action() :: String.t() | atom()

actor_name()

@type actor_name() :: String.t()

payload()

@type payload() :: term() | nil

t()

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

Functions

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

of()

@spec of() :: [t()]

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

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