Tangent.Agent.Passthrough (Tangent v0.2.0) View Source

Passes through all calls to Agent.

Link to this section Summary

Link to this section Types

Specs

agent() :: Agent.agent()

Specs

on_start() :: Agent.on_start()

Specs

state() :: term()

Link to this section Functions

Specs

cast(agent(), (state() -> state())) :: :ok
Link to this function

cast(agent, module, fun, args)

View Source

Specs

cast(agent(), module(), atom(), [term()]) :: :ok

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

get(agent, getter, timeout \\ 5000)

View Source

Specs

get(agent(), getter :: (state() -> a), timeout :: integer()) :: a when a: var
Link to this function

get(agent, module, fun, args, timeout \\ 5000)

View Source

Specs

get(agent(), module(), atom(), [term()], timeout()) :: any()
Link to this function

get_and_update(agent, fun, timeout \\ 5000)

View Source

Specs

get_and_update(agent(), (state() -> {a, state()}), timeout()) :: a when a: var
Link to this function

get_and_update(agent, module, fun, args, timeout \\ 5000)

View Source

Specs

get_and_update(agent(), module(), atom(), [term()], timeout()) :: any()
Link to this function

start_link(fun, options \\ [])

View Source

Specs

start_link((() -> term()), GenServer.options()) :: on_start()
Link to this function

start_link(module, fun, args, options \\ [])

View Source

Specs

start_link(module(), atom(), [any()], GenServer.options()) :: on_start()
Link to this function

stop(agent, reason \\ :normal, timeout \\ :infinity)

View Source

Specs

stop(agent(), reason :: term(), timeout()) :: :ok
Link to this function

update(agent, fun, timeout \\ 5000)

View Source

Specs

update(agent(), (state() -> state()), timeout()) :: :ok
Link to this function

update(agent, module, fun, args, timeout \\ 5000)

View Source

Specs

update(agent(), module(), atom(), [term()], timeout()) :: :ok