View Source amoc_controller (amoc v3.0.0-rc2)
Summary
Types
amoc_controller is disabled for the master node
Types
-type amoc_status() :: idle | {running, amoc:scenario(), user_count(), last_user_id()} | {terminating, amoc:scenario()} | {finished, amoc:scenario()} | {error, any()} | disabled.
-type handle_call_res() :: ok | {ok, term()} | {error, term()}.
-type interarrival() :: non_neg_integer().
-type last_user_id() :: non_neg_integer().
-type state() :: #state{}.
-type user_count() :: non_neg_integer().
Functions
-spec add_users(amoc_scenario:user_id(), amoc_scenario:user_id()) -> ok | {error, term()}.
-spec disable() -> ok | {error, term()}.
-spec get_status() -> amoc_status().
-spec handle_call(any(), any(), state()) -> {reply, handle_call_res(), state()}.
-spec init([]) -> {ok, state()}.
-spec positive_integer(any()) -> boolean().
-spec remove_users(user_count(), boolean()) -> {ok, user_count()}.
-spec start_link() -> {ok, pid()}.
-spec start_scenario(amoc:scenario(), amoc_config:settings()) -> ok | {error, term()}.
-spec stop_scenario() -> ok | {error, term()}.
-spec update_settings(amoc_config:settings()) -> ok | {error, term()}.