View Source amoc_scenario behaviour (amoc v3.0.0-rc2)

Summary

Types

-type state() :: any().
-type user_id() :: pos_integer().

Callbacks

-callback init() -> {ok, state()} | ok | {error, Reason :: term()}.
-callback start(user_id()) -> any().
-callback start(user_id(), state()) -> any().
-callback terminate() -> any().
-callback terminate(state()) -> any().

Functions

-spec init(amoc:scenario()) -> {ok, state()} | {error, Reason :: term()}.
Link to this function

start(Scenario, Id, State)

View Source
-spec start(amoc:scenario(), user_id(), state()) -> any().
Link to this function

terminate(Scenario, State)

View Source
-spec terminate(amoc:scenario(), state()) -> {ok, any()} | {error, Reason :: term()}.