View Source SpawnSdk.Value (spawn_sdk v2.0.0-RC11)

Value is a declarative DSL that provides the Domain Driven aspect of the Spawn technology. It is through a Value that the user can configure the proxy to carry out the infrastructure tasks and from which it provides all the Worflows.

Summary

Types

broadcast()

@type broadcast() :: SpawnSdk.Flow.Broadcast.t()

effects()

@type effects() :: [SpawnSdk.Flow.SideEffect.t()]

forward()

@type forward() :: SpawnSdk.Flow.Forward.t()

new_state()

@type new_state() :: term()

pipe()

@type pipe() :: SpawnSdk.Flow.Pipe.t()

response()

@type response() :: term()

t()

@type t() :: %SpawnSdk.Value{
  broadcast: SpawnSdk.Flow.Broadcast.t(),
  effects: [SpawnSdk.Flow.SideEffect.t()],
  forward: SpawnSdk.Flow.Forward.t(),
  pipe: SpawnSdk.Flow.Pipe.t(),
  state: term(),
  tags: map(),
  value: term()
}

tags()

@type tags() :: map()

value()

@type value() :: t()

Functions

broadcast(value, broadcast)

@spec broadcast(value(), broadcast()) :: value()

effect(value, effect)

@spec effect(value(), effects()) :: value()

effects(value, effects)

@spec effects(value(), effects()) :: value()

forward(value, forward)

@spec forward(value(), forward()) :: value()

noreply!(value, opts \\ [])

noreply_state!(state)

@spec noreply_state!(new_state()) :: {:reply, value()}

of()

@spec of() :: value()

of(response, new_state)

@spec of(response(), new_state()) :: value()

of(value, response, new_state)

@spec of(value(), response(), new_state()) :: value()

pipe(value, pipe)

@spec pipe(value(), pipe()) :: value()

reply!(value)

@spec reply!(value()) :: {:reply, value()}

response(value, response)

@spec response(value(), response()) :: value()

state(value, new_state)

@spec state(value(), new_state()) :: value()

tags(value, tags)

@spec tags(value(), tags()) :: value()

value(value, response)

@spec value(value(), response()) :: value()

void()

@spec void() :: {:reply, value()}

void(value)

@spec void(value()) :: {:reply, value()}