Flexflow.Process behaviour (flexflow v0.1.7) View Source

Process

Link to this section Summary

Types

Init result

Process state

t()

Callbacks

Invoked when process is started, after events and transitions init, see Flexflow.Api.init/1

Module name

Link to this section Types

Specs

definition() :: {:event | :transition, Flexflow.key_normalize()}

Specs

result() :: {:ok, t()} | {:error, term()}

Init result

Specs

state()

Process state

[:created, :active, :loop, :waiting, :paused]

Specs

t() :: %Flexflow.Process{
  __args__: Flexflow.process_args(),
  __context__: Flexflow.Context.t(),
  __counter__: integer(),
  __definitions__: [definition()],
  __graphviz__: Keyword.t(),
  __loop__: integer(),
  __opts__: Keyword.t(),
  __tasks__: %{required(reference()) => term()},
  events: Flexflow.events(),
  id: Flexflow.id() | nil,
  module: module(),
  name: Flexflow.name() | nil,
  state: state(),
  transitions: Flexflow.transitions()
}

Link to this section Functions

Specs

after_init(t()) :: result()
Link to this function

async(p, f, callback, value, opts \\ [])

View Source

Specs

async(t(), (() -> r), (arg, t(), :ok | :error, r -> result()), arg, Keyword.t()) ::
  t()
when arg: term(), r: term()
Link to this macro

event(key, opts \\ [])

View Source (macro)
Link to this function

handle_call(p, input, from \\ nil)

View Source

Specs

handle_call(t(), term(), GenServer.from() | nil) :: result()

Specs

handle_cast(t(), term()) :: result()

Specs

handle_info(t(), term()) :: result()

Specs

init(t()) :: result()

Specs

loop(t()) :: result()
Link to this function

new(module, id, args \\ %{})

View Source

Specs

Specs

next(t()) :: result()

Specs

terminate(t(), term()) :: term()
Link to this macro

transition(key, tuple, opts \\ [])

View Source (macro)

Link to this section Callbacks

Link to this callback

handle_call(t, term, arg3)

View Source (optional)

Specs

handle_call(t(), term(), GenServer.from()) :: result()
Link to this callback

handle_cast(t, term)

View Source (optional)

Specs

handle_cast(t(), term()) :: result()
Link to this callback

handle_info(t, term)

View Source (optional)

Specs

handle_info(t(), term()) :: result()

Specs

init(t()) :: result()

Invoked when process is started, after events and transitions init, see Flexflow.Api.init/1

Specs

name() :: Flexflow.name()

Module name

Link to this callback

terminate(t, term)

View Source (optional)

Specs

terminate(t(), term()) :: term()