Copyright © 2011-2016 Garrett Smith
Behaviours: gen_server.
Authors: Garrett Smith (g@rre.tt).
e2 service behavior.
e2 services are the base process type in e2.
e2 services provide the same functionality as gen_server but with a simplified interface.
For more information see e2 services documentation.| call/2 | Sends a message to a service and waits for a reply. |
| call/3 | Sends a message to a service and waits for a reply. |
| cast/2 | Sends a message to a service without waiting for a reply. |
| reply/2 | Used by service implementations to reply to a message. |
| start_link/2 | Starts an e2 service. |
| start_link/3 | Starts an e2 service. |
call(ServiceRef, Msg) -> any()
Equivalent to call(ServiceRef, Msg, infinity).
Sends a message to a service and waits for a reply.
call(ServiceRef, Msg, Timeout) -> Reply
Sends a message to a service and waits for a reply.
cast(ServiceRef, Msg) -> ok
Sends a message to a service without waiting for a reply.
reply(Client, Reply) -> any()
Used by service implementations to reply to a message.
Client is theFrom argument from the request handle_msg/3
call.
start_link(Module, Args) -> any()
Equivalent to start_link(Module, Args).
Starts an e2 service.
start_link(Module, Args, Options) -> {ok, Pid} | {error, Reason}
Starts an e2 service.
Module is the service callback module.
If init/1 is exported, Args is the argument passed to the function
when the service is initialized. If init/1 is not exported, Args
is the initial service state.
registered or {registered, Name} is provided as an option, the
service will be registered. If not specified, the registered name
defaults to Module.
Generated by EDoc