Module:init(Id, Opts) -> {ok, State} | {ok, State, Priority}
OTP R14B02
Types
MANDATORY
This function is always called before any other callback function. Use it to initiate any common state. It is to return a state for this CTH.
Id
is either the return value of ct_hooks:id/1
, or a reference
(created using erlang:make_ref/0
in ERTS) if ct_hooks:id/1
is not implemented.
Priority
is the relative priority of this hook. Hooks with a lower priority are executed first. If no priority is specified, it is set to 0
.
For details about when init
is called, see section CTH Scope
in the User's Guide.