Cairn.Function (cairn v0.1.1)

Copy Markdown View Source

Function-backed Cairn servers.

Summary

Functions

Returns a specification to start this module under a supervisor.

Types

fun()

@type fun() :: (Cairn.Message.payload() -> term())

state()

@type state() :: %{fun: fun()}

Functions

child_spec(init_arg)

@spec child_spec(term()) :: Supervisor.child_spec()

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(arg, opts \\ [])

@spec start_link(term(), GenServer.options()) :: GenServer.on_start()

start_many(funs)

@spec start_many([fun()]) :: {:ok, [pid()]} | {:error, term()}