Copyright © 2011-2022 Michael Truog
Version: 2.0.5 Oct 26 2023 12:17:28 ------------------------------------------------------------------------
This module defines the cloudi_service behaviour.
Required callback functions: cloudi_service_init/4, cloudi_service_terminate/3.
Optional callback functions: cloudi_service_handle_request/11, cloudi_service_handle_info/3.
Authors: Michael Truog (mjtruog at protonmail dot com).
The user module should export: cloudi_service_init(Args, Prefix, Timeout, Dispatcher) ==> {ok, State} {stop, Reason} {stop, Reason, State} State = undefined, if not returned Reason = restart | shutdown | Term cloudi_service_handle_request(RequestType, Name, Pattern, RequestInfo, Request, Timeout, Priority, TransId, Source, State, Dispatcher) ==> {reply, Response, StateNew} {reply, ResponseInfo, Response, StateNew} {forward, NameNext, RequestInfoNext, RequestNext, StateNew} {forward, NameNext, RequestInfoNext, RequestNext, TimeoutNext, PriorityNext, StateNew} {noreply, StateNew} {stop, Reason, StateNew} Reason = restart | shutdown | Term cloudi_service_handle_info(Request, State, Dispatcher) ==> {noreply, State} {stop, Reason, StateNew} Reason = restart | shutdown | Term cloudi_service_terminate(Reason, Timeout, State) Always called when the service terminates (either due to a stop tuple return value, an error/exit/throw exception or an exit signal). ==> ok The work flow (of the service) can be described as follows: User module Generic ----------- ------- cloudi_service_init <----- . loop cloudi_service_handle_request <----- . -----> reply cloudi_service_handle_info <----- . cloudi_service_terminate <----- .
dispatcher() = pid()
Source Erlang Process of a CloudI Service that will receive the service request response. The same Erlang process receives the CloudI Service's incoming service requests based on its subscriptions.
error_reason() = timeout
key_values() = cloudi_key_value:key_values()
key_values(Key, Value) = cloudi_key_value:key_values(Key, Value)
pattern_pid() = cloudi:pattern_pid()
priority() = cloudi:priority()
priority_value() = cloudi:priority_value()
request() = cloudi:request()
request_info() = cloudi:request_info()
request_result() = {reply, ResponseInfo::response_info(), Response::response()} | {forward, NameNext::service_name(), RequestInfoNext::request_info(), RequestNext::request(), TimeoutNext::timeout_value_milliseconds(), PriorityNext::priority_value()} | noreply
request_type() = send_async | send_sync
response() = cloudi:response()
response_info() = cloudi:response_info()
service_name() = cloudi:service_name()
service_name_pattern() = cloudi:service_name_pattern()
service_name_pattern_suffix() = cloudi:service_name_pattern_suffix()
source() = pid()
timeout_milliseconds() = cloudi:timeout_milliseconds()
timeout_period() = cloudi:timeout_period()
timeout_value_milliseconds() = cloudi:timeout_value_milliseconds()
trans_id() = cloudi:trans_id()
version 1 UUID
context_options/1 |
Get the context options from the service's configuration.A service would only use this when delaying the creation of a context for child processes. |
demonitor/2 |
Demonitor an Erlang pid.The function will make sure an Erlang pid is demonitored properly. |
demonitor/3 |
Demonitor an Erlang pid with options.The function will make sure an Erlang pid is demonitored properly. |
destination_refresh_immediate/1 |
Configured service destination refresh is immediate.. |
destination_refresh_lazy/1 |
Configured service destination refresh is lazy.. |
dispatcher/1 |
Return the Erlang pid representing the service sender.Use when the Dispatcher is stored and used after the current cloudi_service callback has returned. |
duo_mode/1 |
Determine if duo_mode is enabled.. |
forward/9 |
Forward a service request.. |
forward_async/8 |
Forward an asynchronous service request.. |
forward_sync/8 |
Forward a synchronous service request.. |
get_pid/2 |
Get a service destination based on a service name.. |
get_pid/3 |
Get a service destination based on a service name.. |
get_pids/2 |
Get all service destinations based on a service name.. |
get_pids/3 |
Get a service destination based on a service name.. |
mcast_async/3 |
Send a multicast asynchronous service request.Asynchronous service requests are sent to all services that have subscribed to the service name pattern that matches the destination. |
mcast_async/4 |
Send a multicast asynchronous service request.Asynchronous service requests are sent to all services that have subscribed to the service name pattern that matches the destination. |
mcast_async/6 |
Send a multicast asynchronous service request.Asynchronous service requests are sent to all services that have subscribed to the service name pattern that matches the destination. |
mcast_async_active/3 |
Send a multicast asynchronous service request.Asynchronous service requests are sent to all services that have subscribed to the service name pattern that matches the destination. |
mcast_async_active/4 |
Send a multicast asynchronous service request.Asynchronous service requests are sent to all services that have subscribed to the service name pattern that matches the destination. |
mcast_async_active/6 |
Send a multicast asynchronous service request.Asynchronous service requests are sent to all services that have subscribed to the service name pattern that matches the destination. |
mcast_async_passive/3 |
Send a multicast asynchronous service request.An alias for mcast_async. |
mcast_async_passive/4 |
Send a multicast asynchronous service request.An alias for mcast_async. |
mcast_async_passive/6 |
Send a multicast asynchronous service request.An alias for mcast_async. |
monitor/2 |
Monitor an Erlang pid.The function will make sure an Erlang pid is monitored properly so the cloudi_service_handle_info/3 callback receives the monitor result. |
prefix/1 |
Configured service default prefix.All subscribed/unsubscribed service names use this prefix. |
priority_default/1 |
Configured service default priority.. |
process_count/1 |
Return the initial process count of this instance of the service.The configuration of the service defined how many instances should exist. |
process_count_max/1 |
Return the process count maximum of this instance of the service.This will be the same as the process_count, unless count_process_dynamic configuration provides a maximum that is greater than the process_count. |
process_count_min/1 |
Return the process count minimum of this instance of the service.This will be the same as the process_count, unless count_process_dynamic configuration provides a minimum that is less than the process_count. |
process_index/1 |
Return the 0-based index of this instance of the service.The configuration of the service defined how many instances should exist. |
recv_async/1 |
Receive an asynchronous service request.Use a null TransId to receive the oldest service request. |
recv_async/2 |
Receive an asynchronous service request.Either use the supplied TransId to receive the specific service request or use a null TransId to receive the oldest service request. |
recv_async/3 |
Receive an asynchronous service request.Either use the supplied TransId to receive the specific service request or use a null TransId to receive the oldest service request. |
recv_async/4 |
Receive an asynchronous service request.. |
recv_asyncs/2 |
Receive asynchronous service requests.. |
recv_asyncs/3 |
Receive asynchronous service requests.. |
recv_asyncs/4 |
Receive asynchronous service requests.. |
return/2 |
Return a service response.. |
return/3 |
Return a service response.. |
return/9 |
Return a service response.. |
return_async/8 |
Return an asynchronous service response.. |
return_nothrow/9 |
Return a service response without exiting the request handler.Should rarely, if ever, be used. |
return_sync/8 |
Return a synchronous service response.. |
self/1 |
Return the Erlang pid representing the service.. |
send_async/3 |
Send an asynchronous service request.. |
send_async/4 |
Send an asynchronous service request.. |
send_async/5 |
Send an asynchronous service request.. |
send_async/6 |
Send an asynchronous service request.. |
send_async/7 |
Send an asynchronous service request.. |
send_async_active/3 |
Send an asynchronous service request.The response is sent to the service as an Erlang message which is either:{return_async_active, Name, Pattern, ResponseInfo, Response, Timeout, TransId}
(or)
{timeout_async_active, TransId}
use -include_lib("cloudi_core/include/cloudi_service.hrl"). to have:
#return_async_active{} (or) #timeout_async_active{} |
send_async_active/4 |
Send an asynchronous service request.The response is sent to the service as an Erlang message which is either:{return_async_active, Name, Pattern, ResponseInfo, Response, Timeout, TransId}
(or)
{timeout_async_active, TransId}
use -include_lib("cloudi_core/include/cloudi_service.hrl"). to have:
#return_async_active{} (or) #timeout_async_active{} |
send_async_active/5 |
Send an asynchronous service request.The response is sent to the service as an Erlang message which is either:{return_async_active, Name, Pattern, ResponseInfo, Response, Timeout, TransId}
(or)
{timeout_async_active, TransId}
use -include_lib("cloudi_core/include/cloudi_service.hrl"). to have:
#return_async_active{} (or) #timeout_async_active{} |
send_async_active/6 |
Send an asynchronous service request.The response is sent to the service as an Erlang message which is either:{return_async_active, Name, Pattern, ResponseInfo, Response, Timeout, TransId}
(or)
{timeout_async_active, TransId}
use -include_lib("cloudi_core/include/cloudi_service.hrl"). to have:
#return_async_active{} (or) #timeout_async_active{} |
send_async_active/7 |
Send an asynchronous service request.The response is sent to the service as an Erlang message which is either:{return_async_active, Name, Pattern, ResponseInfo, Response, Timeout, TransId}
(or)
{timeout_async_active, TransId}
use -include_lib("cloudi_core/include/cloudi_service.hrl"). to have:
#return_async_active{} (or) #timeout_async_active{} |
send_async_active/8 |
Send an asynchronous service request with a previously generated transaction id.Only meant for special transaction handling. |
send_async_passive/3 |
Send an asynchronous service request.An alias for send_async. |
send_async_passive/4 |
Send an asynchronous service request.An alias for send_async. |
send_async_passive/5 |
Send an asynchronous service request.An alias for send_async. |
send_async_passive/6 |
Send an asynchronous service request.An alias for send_async. |
send_async_passive/7 |
Send an asynchronous service request.An alias for send_async. |
send_sync/3 |
Send a synchronous service request.. |
send_sync/4 |
Send a synchronous service request.. |
send_sync/5 |
Send a synchronous service request.. |
send_sync/6 |
Send a synchronous service request.. |
send_sync/7 |
Send a synchronous service request.. |
source_subscriptions/2 |
Get a list of all service name patterns a service request source is subscribed to.The source pid can be found at: cloudi_service_handle_request(_, _, _, _, _, _, _, _, Source, _, _) |
subscribe/2 |
Subscribe to a service name pattern.. |
subscribe_count/2 |
Determine how may service name pattern subscriptions have occurred.. |
suffix/2 |
Service request suffix from a service name or service name pattern.. |
timeout_async/1 |
Configured service default asynchronous timeout (in milliseconds).. |
timeout_max/1 |
Maximum possible service request timeout (in milliseconds).Use ?TIMEOUT_MAX_ERLANG directly from cloudi_constants.hrl instead, if possible. |
timeout_sync/1 |
Configured service default synchronous timeout (in milliseconds).. |
trans_id/1 |
Return a new transaction id.The same data as used when sending service requests is used. |
unsubscribe/2 |
Unsubscribe from a service name pattern.. |
context_options(Dispatcher::dispatcher()) -> cloudi:options()
demonitor(Dispatcher::dispatcher(), MonitorRef::reference()) -> true
demonitor(Dispatcher::dispatcher(), MonitorRef::reference(), Options::list()) -> true
destination_refresh_immediate(Dispatcher::dispatcher()) -> boolean()
destination_refresh_lazy(Dispatcher::dispatcher()) -> boolean()
dispatcher(Dispatcher::dispatcher()) -> DispatcherNew::pid()
duo_mode(Dispatcher::dispatcher()) -> boolean()
forward(Dispatcher::dispatcher(), RequestType::request_type(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_value_milliseconds(), Priority::priority(), TransId::trans_id(), Source::source()) -> no_return()
forward_async(Dispatcher::dispatcher(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_value_milliseconds(), Priority::priority(), TransId::trans_id(), Source::source()) -> no_return()
forward_sync(Dispatcher::dispatcher(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_value_milliseconds(), Priority::priority(), TransId::trans_id(), Source::source()) -> no_return()
get_pid(Dispatcher::dispatcher(), Name::service_name()) -> {ok, PatternPid::pattern_pid()} | {error, Reason::error_reason()}
get_pid(Dispatcher::dispatcher(), Name::service_name(), Timeout::timeout_period()) -> {ok, PatternPid::pattern_pid()} | {error, Reason::error_reason()}
get_pids(Dispatcher::dispatcher(), Name::service_name()) -> {ok, PatternPids::[pattern_pid(), ...]} | {error, Reason::error_reason()}
get_pids(Dispatcher::dispatcher(), Name::service_name(), Timeout::timeout_period()) -> {ok, PatternPids::[pattern_pid(), ...]} | {error, Reason::error_reason()}
mcast_async(Dispatcher::dispatcher(), Name::service_name(), Request::request()) -> {ok, TransIdList::[trans_id()]} | {error, Reason::error_reason()}
mcast_async(Dispatcher::dispatcher(), Name::service_name(), Request::request(), Timeout::timeout_period()) -> {ok, TransIdList::[trans_id()]} | {error, Reason::error_reason()}
mcast_async(Dispatcher::dispatcher(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_period(), Priority::priority()) -> {ok, TransIdList::[trans_id()]} | {error, Reason::error_reason()}
mcast_async_active(Dispatcher::dispatcher(), Name::service_name(), Request::request()) -> {ok, TransIdList::[trans_id()]} | {error, Reason::error_reason()}
{return_async_active, Name, Pattern, ResponseInfo, Response, Timeout, TransId}
(or)
{timeout_async_active, TransId}
use -include_lib("cloudi_core/include/cloudi_service.hrl").
to have:
#return_async_active{}
(or) #timeout_async_active{}
mcast_async_active(Dispatcher::dispatcher(), Name::service_name(), Request::request(), Timeout::timeout_period()) -> {ok, TransIdList::[trans_id()]} | {error, Reason::error_reason()}
{return_async_active, Name, Pattern, ResponseInfo, Response, Timeout, TransId}
(or)
{timeout_async_active, TransId}
use -include_lib("cloudi_core/include/cloudi_service.hrl").
to have:
#return_async_active{}
(or) #timeout_async_active{}
mcast_async_active(Dispatcher::dispatcher(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_period(), Priority::priority()) -> {ok, TransIdList::[trans_id()]} | {error, Reason::error_reason()}
{return_async_active, Name, Pattern, ResponseInfo, Response, Timeout, TransId}
(or)
{timeout_async_active, TransId}
use -include_lib("cloudi_core/include/cloudi_service.hrl").
to have:
#return_async_active{}
(or) #timeout_async_active{}
mcast_async_passive(Dispatcher::dispatcher(), Name::service_name(), Request::request()) -> {ok, TransIdList::[trans_id()]} | {error, Reason::error_reason()}
mcast_async_passive(Dispatcher::dispatcher(), Name::service_name(), Request::request(), Timeout::timeout_period()) -> {ok, TransIdList::[trans_id()]} | {error, Reason::error_reason()}
mcast_async_passive(Dispatcher::dispatcher(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_period(), Priority::priority()) -> {ok, TransIdList::[trans_id()]} | {error, Reason::error_reason()}
monitor(Dispatcher::dispatcher(), Pid::pid()) -> MonitorRef::reference()
prefix(Dispatcher::dispatcher()) -> Prefix::service_name_pattern()
priority_default(Dispatcher::dispatcher()) -> PriorityDefault::cloudi_service_api:priority()
process_count(Dispatcher::dispatcher()) -> ProcessCount::pos_integer()
process_count_max(Dispatcher::dispatcher()) -> ProcessCountMax::pos_integer()
process_count_min(Dispatcher::dispatcher()) -> ProcessCountMin::pos_integer()
process_index(Dispatcher::dispatcher()) -> ProcessIndex::non_neg_integer()
recv_async(Dispatcher::dispatcher()) -> {ok, ResponseInfo::response_info(), Response::response(), TransId::trans_id()} | {error, Reason::error_reason()}
recv_async(Dispatcher::dispatcher(), TransId::timeout_period() | trans_id()) -> {ok, ResponseInfo::response_info(), Response::response(), TransId::trans_id()} | {error, Reason::error_reason()}
recv_async(Dispatcher::dispatcher(), TransId::timeout_period() | trans_id(), Consume::trans_id() | boolean()) -> {ok, ResponseInfo::response_info(), Response::response(), TransId::trans_id()} | {error, Reason::error_reason()}
recv_async(Dispatcher::dispatcher(), Timeout::timeout_period(), TransId::trans_id(), Consume::boolean()) -> {ok, ResponseInfo::response_info(), Response::response(), TransId::trans_id()} | {error, Reason::error_reason()}
recv_asyncs(Dispatcher::dispatcher(), TransIdList::[trans_id()]) -> {ok, [{ResponseInfo::response_info(), Response::response(), TransId::trans_id()}]} | {error, Reason::error_reason()}
recv_asyncs(Dispatcher::dispatcher(), Timeout::timeout_period(), TransIdList::[trans_id()]) -> {ok, [{ResponseInfo::response_info(), Response::response(), TransId::trans_id()}]} | {error, Reason::error_reason()}
recv_asyncs(Dispatcher::dispatcher(), Timeout::timeout_period(), TransIdList::[trans_id()], Consume::boolean()) -> {ok, [{ResponseInfo::response_info(), Response::response(), TransId::trans_id()}]} | {error, Reason::error_reason()}
return(Dispatcher::dispatcher(), Response::response()) -> no_return()
return(Dispatcher::dispatcher(), ResponseInfo::response_info(), Response::response()) -> no_return()
return(Dispatcher::dispatcher(), RequestType::request_type(), Name::service_name(), Pattern::service_name_pattern(), ResponseInfo::response_info(), Response::response(), Timeout::timeout_value_milliseconds(), TransId::trans_id(), Source::source()) -> no_return()
return_async(Dispatcher::dispatcher(), Name::service_name(), Pattern::service_name_pattern(), ResponseInfo::response_info(), Response::response(), Timeout::timeout_value_milliseconds(), TransId::trans_id(), Source::source()) -> no_return()
return_nothrow(Dispatcher::dispatcher(), RequestType::request_type(), Name::service_name(), Pattern::service_name_pattern(), ResponseInfo::response_info(), Response::response(), Timeout::timeout_value_milliseconds(), TransId::trans_id(), Source::source()) -> ok
return_sync(Dispatcher::dispatcher(), Name::service_name(), Pattern::service_name_pattern(), ResponseInfo::response_info(), Response::response(), Timeout::timeout_value_milliseconds(), TransId::trans_id(), Source::source()) -> no_return()
self(Dispatcher::dispatcher()) -> Self::source()
send_async(Dispatcher::dispatcher(), Name::service_name(), Request::request()) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
send_async(Dispatcher::dispatcher(), Name::service_name(), Request::request(), Timeout::timeout_period()) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
send_async(Dispatcher::dispatcher(), Name::service_name(), Request::request(), Timeout::timeout_period(), PatternPid::pattern_pid() | undefined) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
send_async(Dispatcher::dispatcher(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_period(), Priority::priority()) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
send_async(Dispatcher::dispatcher(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_period(), Priority::priority(), PatternPid::pattern_pid() | undefined) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
send_async_active(Dispatcher::dispatcher(), Name::service_name(), Request::request()) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
{return_async_active, Name, Pattern, ResponseInfo, Response, Timeout, TransId}
(or)
{timeout_async_active, TransId}
use -include_lib("cloudi_core/include/cloudi_service.hrl").
to have:
#return_async_active{}
(or) #timeout_async_active{}
send_async_active(Dispatcher::dispatcher(), Name::service_name(), Request::request(), Timeout::timeout_period()) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
{return_async_active, Name, Pattern, ResponseInfo, Response, Timeout, TransId}
(or)
{timeout_async_active, TransId}
use -include_lib("cloudi_core/include/cloudi_service.hrl").
to have:
#return_async_active{}
(or) #timeout_async_active{}
send_async_active(Dispatcher::dispatcher(), Name::service_name(), Request::request(), Timeout::timeout_period(), PatternPid::pattern_pid() | undefined) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
{return_async_active, Name, Pattern, ResponseInfo, Response, Timeout, TransId}
(or)
{timeout_async_active, TransId}
use -include_lib("cloudi_core/include/cloudi_service.hrl").
to have:
#return_async_active{}
(or) #timeout_async_active{}
send_async_active(Dispatcher::dispatcher(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_period(), Priority::priority()) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
{return_async_active, Name, Pattern, ResponseInfo, Response, Timeout, TransId}
(or)
{timeout_async_active, TransId}
use -include_lib("cloudi_core/include/cloudi_service.hrl").
to have:
#return_async_active{}
(or) #timeout_async_active{}
send_async_active(Dispatcher::dispatcher(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_period(), Priority::priority(), PatternPid::pattern_pid() | undefined) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
{return_async_active, Name, Pattern, ResponseInfo, Response, Timeout, TransId}
(or)
{timeout_async_active, TransId}
use -include_lib("cloudi_core/include/cloudi_service.hrl").
to have:
#return_async_active{}
(or) #timeout_async_active{}
send_async_active(Dispatcher::dispatcher(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_period(), Priority::priority(), TransId::trans_id(), PatternPid::pattern_pid()) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
{return_async_active, Name, Pattern, ResponseInfo, Response, Timeout, TransId}
(or)
{timeout_async_active, TransId}
use -include_lib("cloudi_core/include/cloudi_service.hrl").
to have:
#return_async_active{}
(or) #timeout_async_active{}
send_async_passive(Dispatcher::dispatcher(), Name::service_name(), Request::request()) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
send_async_passive(Dispatcher::dispatcher(), Name::service_name(), Request::request(), Timeout::timeout_period()) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
send_async_passive(Dispatcher::dispatcher(), Name::service_name(), Request::request(), Timeout::timeout_period(), PatternPid::pattern_pid() | undefined) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
send_async_passive(Dispatcher::dispatcher(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_period(), Priority::priority()) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
send_async_passive(Dispatcher::dispatcher(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_period(), Priority::priority(), PatternPid::pattern_pid() | undefined) -> {ok, TransId::trans_id()} | {error, Reason::error_reason()}
send_sync(Dispatcher::dispatcher(), Name::service_name(), Request::request()) -> {ok, ResponseInfo::response_info(), Response::response()} | {ok, Response::response()} | {error, Reason::error_reason()}
send_sync(Dispatcher::dispatcher(), Name::service_name(), Request::request(), Timeout::timeout_period()) -> {ok, ResponseInfo::response_info(), Response::response()} | {ok, Response::response()} | {error, Reason::error_reason()}
send_sync(Dispatcher::dispatcher(), Name::service_name(), Request::request(), Timeout::timeout_period(), PatternPid::pattern_pid() | undefined) -> {ok, ResponseInfo::response_info(), Response::response()} | {ok, Response::response()} | {error, Reason::error_reason()}
send_sync(Dispatcher::dispatcher(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_period(), Priority::priority()) -> {ok, ResponseInfo::response_info(), Response::response()} | {ok, Response::response()} | {error, Reason::error_reason()}
send_sync(Dispatcher::dispatcher(), Name::service_name(), RequestInfo::request_info(), Request::request(), Timeout::timeout_period(), Priority::priority(), PatternPid::pattern_pid() | undefined) -> {ok, ResponseInfo::response_info(), Response::response()} | {ok, Response::response()} | {error, Reason::error_reason()}
source_subscriptions(Dispatcher::dispatcher(), Source::source()) -> [service_name_pattern()]
The source pid can be found at:
cloudi_service_handle_request(_, _, _, _, _, _, _, _, Source, _, _)
subscribe(Dispatcher::dispatcher(), Pattern::service_name_pattern_suffix()) -> ok | error
subscribe_count(Dispatcher::dispatcher(), Pattern::service_name_pattern_suffix()) -> non_neg_integer()
suffix(Dispatcher::dispatcher(), NameOrPattern::service_name() | service_name_pattern()) -> Suffix::service_name() | service_name_pattern()
timeout_async(Dispatcher::dispatcher()) -> TimeoutAsync::cloudi_service_api:timeout_send_async_value_milliseconds()
timeout_max(Dispatcher::dispatcher()) -> 4294967295
timeout_sync(Dispatcher::dispatcher()) -> TimeoutSync::cloudi_service_api:timeout_send_sync_value_milliseconds()
trans_id(Dispatcher::dispatcher()) -> trans_id()
unsubscribe(Dispatcher::dispatcher(), Pattern::service_name_pattern_suffix()) -> ok | error
Generated by EDoc