Current section

Files

Jump to
cloudi_core doc cloudi_service_api.html
Raw

doc/cloudi_service_api.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Module cloudi_service_api</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
</head>
<body bgcolor="white">
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<hr>
<h1>Module cloudi_service_api</h1>
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>
<h3><a name="CloudI_Service_API_Module">CloudI Service API Module</a></h3>
A module that exposes dynamic configuration of CloudI.
<p>Copyright © 2011-2014 Michael Truog</p>
<p><b>Version:</b> 1.3.3 Sep 30 2014 14:01:30
------------------------------------------------------------------------</p>
<p><b>Authors:</b> Michael Truog (<a href="mailto:mjtruog [at] gmail (dot) com"><tt>mjtruog [at] gmail (dot) com</tt></a>).</p>
<h2><a name="description">Description</a></h2>
<h3><a name="CloudI_Service_API_Module">CloudI Service API Module</a></h3>
A module that exposes dynamic configuration of CloudI.
<h2><a name="types">Data Types</a></h2>
<h3 class="typedecl"><a name="type-acl">acl()</a></h3>
<p><tt>acl() = [atom() | <a href="cloudi.html#type-service_name_pattern">cloudi:service_name_pattern()</a>]</tt></p>
<h3 class="typedecl"><a name="type-api_timeout_milliseconds">api_timeout_milliseconds()</a></h3>
<p><tt>api_timeout_milliseconds() = 101..4294967295 | infinity</tt></p>
<h3 class="typedecl"><a name="type-aspect_info_after_internal">aspect_info_after_internal()</a></h3>
<p><tt>aspect_info_after_internal() = <a href="#type-aspect_info_internal">aspect_info_internal()</a></tt></p>
<h3 class="typedecl"><a name="type-aspect_info_after_internal_f">aspect_info_after_internal_f()</a></h3>
<p><tt>aspect_info_after_internal_f() = <a href="#type-aspect_info_internal_f">aspect_info_internal_f()</a></tt></p>
<h3 class="typedecl"><a name="type-aspect_info_before_internal">aspect_info_before_internal()</a></h3>
<p><tt>aspect_info_before_internal() = <a href="#type-aspect_info_internal">aspect_info_internal()</a></tt></p>
<h3 class="typedecl"><a name="type-aspect_info_before_internal_f">aspect_info_before_internal_f()</a></h3>
<p><tt>aspect_info_before_internal_f() = <a href="#type-aspect_info_internal_f">aspect_info_internal_f()</a></tt></p>
<h3 class="typedecl"><a name="type-aspect_info_internal">aspect_info_internal()</a></h3>
<p><tt>aspect_info_internal() = <a href="#type-aspect_info_internal_f">aspect_info_internal_f()</a> | {Module::module(), Function::atom()}</tt></p>
<h3 class="typedecl"><a name="type-aspect_info_internal_f">aspect_info_internal_f()</a></h3>
<p><tt>aspect_info_internal_f() = fun((Request::any(), State::any(), Dispatcher::<a href="cloudi_service.html#type-dispatcher">cloudi_service:dispatcher()</a>) -&gt; {ok, NewState::any()} | {stop, Reason::any(), NewState::any()})</tt></p>
<h3 class="typedecl"><a name="type-aspect_init_after_external">aspect_init_after_external()</a></h3>
<p><tt>aspect_init_after_external() = <a href="#type-aspect_init_after_external_f">aspect_init_after_external_f()</a> | {Module::module(), Function::atom()}</tt></p>
<h3 class="typedecl"><a name="type-aspect_init_after_external_f">aspect_init_after_external_f()</a></h3>
<p><tt>aspect_init_after_external_f() = fun((CommandLine::[string()], Prefix::<a href="cloudi.html#type-service_name_pattern">cloudi:service_name_pattern()</a>, Timeout::<a href="#type-timeout_milliseconds">timeout_milliseconds()</a>, State::any()) -&gt; {ok, NewState::any()} | {stop, Reason::any(), NewState::any()})</tt></p>
<h3 class="typedecl"><a name="type-aspect_init_after_internal">aspect_init_after_internal()</a></h3>
<p><tt>aspect_init_after_internal() = <a href="#type-aspect_init_after_internal_f">aspect_init_after_internal_f()</a> | {Module::module(), Function::atom()}</tt></p>
<h3 class="typedecl"><a name="type-aspect_init_after_internal_f">aspect_init_after_internal_f()</a></h3>
<p><tt>aspect_init_after_internal_f() = fun((Args::list(), Prefix::<a href="cloudi_service.html#type-service_name_pattern">cloudi_service:service_name_pattern()</a>, Timeout::<a href="#type-timeout_milliseconds">timeout_milliseconds()</a>, State::any(), Dispatcher::<a href="cloudi_service.html#type-dispatcher">cloudi_service:dispatcher()</a>) -&gt; {ok, NewState::any()} | {stop, Reason::any(), NewState::any()})</tt></p>
<h3 class="typedecl"><a name="type-aspect_request_after_external">aspect_request_after_external()</a></h3>
<p><tt>aspect_request_after_external() = <a href="#type-aspect_request_after_external_f">aspect_request_after_external_f()</a> | {Module::module(), Function::atom()}</tt></p>
<h3 class="typedecl"><a name="type-aspect_request_after_external_f">aspect_request_after_external_f()</a></h3>
<p><tt>aspect_request_after_external_f() = fun((Type::<a href="cloudi_service.html#type-request_type">cloudi_service:request_type()</a>, Name::<a href="cloudi_service.html#type-service_name">cloudi_service:service_name()</a>, Pattern::<a href="cloudi_service.html#type-service_name_pattern">cloudi_service:service_name_pattern()</a>, RequestInfo::<a href="cloudi_service.html#type-request_info">cloudi_service:request_info()</a>, Request::<a href="cloudi_service.html#type-request">cloudi_service:request()</a>, Timeout::<a href="cloudi_service.html#type-timeout_value_milliseconds">cloudi_service:timeout_value_milliseconds()</a>, Priority::<a href="cloudi_service.html#type-priority">cloudi_service:priority()</a>, TransId::<a href="cloudi_service.html#type-trans_id">cloudi_service:trans_id()</a>, Source::<a href="cloudi_service.html#type-source">cloudi_service:source()</a>, Result::<a href="cloudi_service.html#type-request_result">cloudi_service:request_result()</a>, State::any()) -&gt; {ok, NewState::any()} | {stop, Reason::any(), NewState::any()})</tt></p>
<h3 class="typedecl"><a name="type-aspect_request_after_internal">aspect_request_after_internal()</a></h3>
<p><tt>aspect_request_after_internal() = <a href="#type-aspect_request_after_internal_f">aspect_request_after_internal_f()</a> | {Module::module(), Function::atom()}</tt></p>
<h3 class="typedecl"><a name="type-aspect_request_after_internal_f">aspect_request_after_internal_f()</a></h3>
<p><tt>aspect_request_after_internal_f() = fun((Type::<a href="cloudi_service.html#type-request_type">cloudi_service:request_type()</a>, Name::<a href="cloudi_service.html#type-service_name">cloudi_service:service_name()</a>, Pattern::<a href="cloudi_service.html#type-service_name_pattern">cloudi_service:service_name_pattern()</a>, RequestInfo::<a href="cloudi_service.html#type-request_info">cloudi_service:request_info()</a>, Request::<a href="cloudi_service.html#type-request">cloudi_service:request()</a>, Timeout::<a href="cloudi_service.html#type-timeout_value_milliseconds">cloudi_service:timeout_value_milliseconds()</a>, Priority::<a href="cloudi_service.html#type-priority">cloudi_service:priority()</a>, TransId::<a href="cloudi_service.html#type-trans_id">cloudi_service:trans_id()</a>, Source::<a href="cloudi_service.html#type-source">cloudi_service:source()</a>, Result::<a href="cloudi_service.html#type-request_result">cloudi_service:request_result()</a>, State::any(), Dispatcher::<a href="cloudi_service.html#type-dispatcher">cloudi_service:dispatcher()</a>) -&gt; {ok, NewState::any()} | {stop, Reason::any(), NewState::any()})</tt></p>
<h3 class="typedecl"><a name="type-aspect_request_before_external">aspect_request_before_external()</a></h3>
<p><tt>aspect_request_before_external() = <a href="#type-aspect_request_before_external_f">aspect_request_before_external_f()</a> | {Module::module(), Function::atom()}</tt></p>
<h3 class="typedecl"><a name="type-aspect_request_before_external_f">aspect_request_before_external_f()</a></h3>
<p><tt>aspect_request_before_external_f() = fun((Type::<a href="cloudi_service.html#type-request_type">cloudi_service:request_type()</a>, Name::<a href="cloudi_service.html#type-service_name">cloudi_service:service_name()</a>, Pattern::<a href="cloudi_service.html#type-service_name_pattern">cloudi_service:service_name_pattern()</a>, RequestInfo::<a href="cloudi_service.html#type-request_info">cloudi_service:request_info()</a>, Request::<a href="cloudi_service.html#type-request">cloudi_service:request()</a>, Timeout::<a href="cloudi_service.html#type-timeout_value_milliseconds">cloudi_service:timeout_value_milliseconds()</a>, Priority::<a href="cloudi_service.html#type-priority">cloudi_service:priority()</a>, TransId::<a href="cloudi_service.html#type-trans_id">cloudi_service:trans_id()</a>, Source::<a href="cloudi_service.html#type-source">cloudi_service:source()</a>, State::any()) -&gt; {ok, NewState::any()} | {stop, Reason::any(), NewState::any()})</tt></p>
<h3 class="typedecl"><a name="type-aspect_request_before_internal">aspect_request_before_internal()</a></h3>
<p><tt>aspect_request_before_internal() = <a href="#type-aspect_request_before_internal_f">aspect_request_before_internal_f()</a> | {Module::module(), Function::atom()}</tt></p>
<h3 class="typedecl"><a name="type-aspect_request_before_internal_f">aspect_request_before_internal_f()</a></h3>
<p><tt>aspect_request_before_internal_f() = fun((Type::<a href="cloudi_service.html#type-request_type">cloudi_service:request_type()</a>, Name::<a href="cloudi_service.html#type-service_name">cloudi_service:service_name()</a>, Pattern::<a href="cloudi_service.html#type-service_name_pattern">cloudi_service:service_name_pattern()</a>, RequestInfo::<a href="cloudi_service.html#type-request_info">cloudi_service:request_info()</a>, Request::<a href="cloudi_service.html#type-request">cloudi_service:request()</a>, Timeout::<a href="cloudi_service.html#type-timeout_value_milliseconds">cloudi_service:timeout_value_milliseconds()</a>, Priority::<a href="cloudi_service.html#type-priority">cloudi_service:priority()</a>, TransId::<a href="cloudi_service.html#type-trans_id">cloudi_service:trans_id()</a>, Source::<a href="cloudi_service.html#type-source">cloudi_service:source()</a>, State::any(), Dispatcher::<a href="cloudi_service.html#type-dispatcher">cloudi_service:dispatcher()</a>) -&gt; {ok, NewState::any()} | {stop, Reason::any(), NewState::any()})</tt></p>
<h3 class="typedecl"><a name="type-aspect_terminate_before_external">aspect_terminate_before_external()</a></h3>
<p><tt>aspect_terminate_before_external() = <a href="#type-aspect_terminate_before_external_f">aspect_terminate_before_external_f()</a> | {Module::module(), Function::atom()}</tt></p>
<h3 class="typedecl"><a name="type-aspect_terminate_before_external_f">aspect_terminate_before_external_f()</a></h3>
<p><tt>aspect_terminate_before_external_f() = <a href="#type-aspect_terminate_f">aspect_terminate_f()</a></tt></p>
<h3 class="typedecl"><a name="type-aspect_terminate_before_internal">aspect_terminate_before_internal()</a></h3>
<p><tt>aspect_terminate_before_internal() = <a href="#type-aspect_terminate_before_internal_f">aspect_terminate_before_internal_f()</a> | {Module::module(), Function::atom()}</tt></p>
<h3 class="typedecl"><a name="type-aspect_terminate_before_internal_f">aspect_terminate_before_internal_f()</a></h3>
<p><tt>aspect_terminate_before_internal_f() = <a href="#type-aspect_terminate_f">aspect_terminate_f()</a></tt></p>
<h3 class="typedecl"><a name="type-aspect_terminate_f">aspect_terminate_f()</a></h3>
<p><tt>aspect_terminate_f() = fun((Reason::any(), Timeout::<a href="#type-timeout_milliseconds">timeout_milliseconds()</a>, State::any()) -&gt; {ok, State::any()})</tt></p>
<h3 class="typedecl"><a name="type-dest_list">dest_list()</a></h3>
<p><tt>dest_list() = <a href="#type-acl">acl()</a> | undefined</tt></p>
<h3 class="typedecl"><a name="type-dest_refresh">dest_refresh()</a></h3>
<p><tt>dest_refresh() = lazy_closest | immediate_closest | lazy_furthest | immediate_furthest | lazy_random | immediate_random | lazy_local | immediate_local | lazy_remote | immediate_remote | lazy_newest | immediate_newest | lazy_oldest | immediate_oldest | none</tt></p>
<h3 class="typedecl"><a name="type-dest_refresh_delay_milliseconds">dest_refresh_delay_milliseconds()</a></h3>
<p><tt>dest_refresh_delay_milliseconds() = 101..4294967295</tt></p>
<h3 class="typedecl"><a name="type-latency_time_milliseconds">latency_time_milliseconds()</a></h3>
<p><tt>latency_time_milliseconds() = 1..4294967295</tt></p>
<h3 class="typedecl"><a name="type-logging_formatters_set_proplist">logging_formatters_set_proplist()</a></h3>
<p><tt>logging_formatters_set_proplist() = [{any | [module(), ...], [fatal | error | warn | info | debug | trace | emergency | alert | critical | warning | notice | {level, fatal | error | warn | info | debug | trace | emergency | alert | critical | warning | notice} | {output, module() | undefined} | {output_args, list()} | {output_max_r, non_neg_integer()} | {output_max_t, <a href="cloudi_service_api.html#type-seconds">cloudi_service_api:seconds()</a>} | {formatter, module() | undefined} | {formatter_config, list()}]}]</tt></p>
<h3 class="typedecl"><a name="type-logging_proplist">logging_proplist()</a></h3>
<p><tt>logging_proplist() = [{file, string() | undefined} | {level, <a href="#type-loglevel">loglevel()</a>} | {syslog, <a href="#type-logging_syslog_set_proplist">logging_syslog_set_proplist()</a> | undefined} | {formatters, <a href="#type-logging_formatters_set_proplist">logging_formatters_set_proplist()</a> | undefined} | {redirect, node() | undefined}, ...]</tt></p>
<h3 class="typedecl"><a name="type-logging_syslog_set_proplist">logging_syslog_set_proplist()</a></h3>
<p><tt>logging_syslog_set_proplist() = [{identity, string()} | {facility, kern | user | mail | daemon | auth | syslog | lpr | news | uucp | cron | authpriv | ftp | netinfo | remoteauth | install | ras | local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7 | non_neg_integer()} | {level, <a href="#type-loglevel">loglevel()</a> | undefined}]</tt></p>
<h3 class="typedecl"><a name="type-loglevel">loglevel()</a></h3>
<p><tt>loglevel() = fatal | error | warn | info | debug | trace | off</tt></p>
<h3 class="typedecl"><a name="type-node_reconnect_delay_seconds">node_reconnect_delay_seconds()</a></h3>
<p><tt>node_reconnect_delay_seconds() = <a href="#type-period_seconds">period_seconds()</a></tt></p>
<h3 class="typedecl"><a name="type-nodes_proplist">nodes_proplist()</a></h3>
<p><tt>nodes_proplist() = [node() | {nodes, [node()]} | {reconnect_start, <a href="#type-node_reconnect_delay_seconds">node_reconnect_delay_seconds()</a>} | {reconnect_delay, <a href="#type-node_reconnect_delay_seconds">node_reconnect_delay_seconds()</a>} | {listen, visible | all} | {connect, visible | hidden} | {timestamp_type, erlang | os} | {discovery, [{ec2, [{address, <a href="inet.html#type-ip_address">inet:ip_address()</a>} | {port, <a href="inet.html#type-port_number">inet:port_number()</a>} | {ttl, non_neg_integer()}]} | {multicast, [{access_key_id, string()} | {secret_access_key, string()} | {ec2_host, string()} | {groups, [string()]} | {tags, [{string(), string()} | string()]}]}]}, ...]</tt></p>
<h3 class="typedecl"><a name="type-period_seconds">period_seconds()</a></h3>
<p><tt>period_seconds() = 1..4294967</tt></p>
<h3 class="typedecl"><a name="type-priority">priority()</a></h3>
<p><tt>priority() = -128..127</tt></p>
<h3 class="typedecl"><a name="type-request_timeout_immediate_max_milliseconds">request_timeout_immediate_max_milliseconds()</a></h3>
<p><tt>request_timeout_immediate_max_milliseconds() = 0..4294967295</tt></p>
<h3 class="typedecl"><a name="type-response_timeout_immediate_max_milliseconds">response_timeout_immediate_max_milliseconds()</a></h3>
<p><tt>response_timeout_immediate_max_milliseconds() = 0..4294967295</tt></p>
<h3 class="typedecl"><a name="type-seconds">seconds()</a></h3>
<p><tt>seconds() = non_neg_integer()</tt></p>
<h3 class="typedecl"><a name="type-service">service()</a></h3>
<p><tt>service() = #internal{prefix = <a href="cloudi.html#type-service_name_pattern">cloudi:service_name_pattern()</a>, module = undefined | atom() | <a href="file.html#type-filename">file:filename()</a>, args = list(), dest_refresh = <a href="cloudi_service_api.html#type-dest_refresh">cloudi_service_api:dest_refresh()</a>, timeout_init = <a href="cloudi_service_api.html#type-timeout_milliseconds">cloudi_service_api:timeout_milliseconds()</a>, timeout_async = <a href="cloudi_service_api.html#type-timeout_milliseconds">cloudi_service_api:timeout_milliseconds()</a>, timeout_sync = <a href="cloudi_service_api.html#type-timeout_milliseconds">cloudi_service_api:timeout_milliseconds()</a>, dest_list_deny = <a href="cloudi_service_api.html#type-dest_list">cloudi_service_api:dest_list()</a>, dest_list_allow = <a href="cloudi_service_api.html#type-dest_list">cloudi_service_api:dest_list()</a>, count_process = pos_integer() | float(), max_r = non_neg_integer(), max_t = <a href="cloudi_service_api.html#type-seconds">cloudi_service_api:seconds()</a>, options = <a href="cloudi_service_api.html#type-service_options_internal">cloudi_service_api:service_options_internal()</a>} | #external{prefix = <a href="cloudi.html#type-service_name_pattern">cloudi:service_name_pattern()</a>, file_path = undefined | <a href="file.html#type-filename">file:filename()</a>, args = string(), env = [{string(), string()}], dest_refresh = <a href="cloudi_service_api.html#type-dest_refresh">cloudi_service_api:dest_refresh()</a>, protocol = default | local | tcp | udp, buffer_size = default | pos_integer(), timeout_init = <a href="cloudi_service_api.html#type-timeout_milliseconds">cloudi_service_api:timeout_milliseconds()</a>, timeout_async = <a href="cloudi_service_api.html#type-timeout_milliseconds">cloudi_service_api:timeout_milliseconds()</a>, timeout_sync = <a href="cloudi_service_api.html#type-timeout_milliseconds">cloudi_service_api:timeout_milliseconds()</a>, dest_list_deny = <a href="cloudi_service_api.html#type-dest_list">cloudi_service_api:dest_list()</a>, dest_list_allow = <a href="cloudi_service_api.html#type-dest_list">cloudi_service_api:dest_list()</a>, count_process = pos_integer() | float(), count_thread = pos_integer() | float(), max_r = non_neg_integer(), max_t = <a href="cloudi_service_api.html#type-seconds">cloudi_service_api:seconds()</a>, options = <a href="cloudi_service_api.html#type-service_options_external">cloudi_service_api:service_options_external()</a>}</tt></p>
<h3 class="typedecl"><a name="type-service_external">service_external()</a></h3>
<p><tt>service_external() = #external{prefix = <a href="cloudi.html#type-service_name_pattern">cloudi:service_name_pattern()</a>, file_path = undefined | <a href="file.html#type-filename">file:filename()</a>, args = string(), env = [{string(), string()}], dest_refresh = <a href="cloudi_service_api.html#type-dest_refresh">cloudi_service_api:dest_refresh()</a>, protocol = default | local | tcp | udp, buffer_size = default | pos_integer(), timeout_init = <a href="cloudi_service_api.html#type-timeout_milliseconds">cloudi_service_api:timeout_milliseconds()</a>, timeout_async = <a href="cloudi_service_api.html#type-timeout_milliseconds">cloudi_service_api:timeout_milliseconds()</a>, timeout_sync = <a href="cloudi_service_api.html#type-timeout_milliseconds">cloudi_service_api:timeout_milliseconds()</a>, dest_list_deny = <a href="cloudi_service_api.html#type-dest_list">cloudi_service_api:dest_list()</a>, dest_list_allow = <a href="cloudi_service_api.html#type-dest_list">cloudi_service_api:dest_list()</a>, count_process = pos_integer() | float(), count_thread = pos_integer() | float(), max_r = non_neg_integer(), max_t = <a href="cloudi_service_api.html#type-seconds">cloudi_service_api:seconds()</a>, options = <a href="cloudi_service_api.html#type-service_options_external">cloudi_service_api:service_options_external()</a>}</tt></p>
<h3 class="typedecl"><a name="type-service_id">service_id()</a></h3>
<p><tt>service_id() = &lt;&lt;_:128&gt;&gt;</tt></p>
<p> version 1 UUID (service instance id)</p>
<h3 class="typedecl"><a name="type-service_internal">service_internal()</a></h3>
<p><tt>service_internal() = #internal{prefix = <a href="cloudi.html#type-service_name_pattern">cloudi:service_name_pattern()</a>, module = undefined | atom() | <a href="file.html#type-filename">file:filename()</a>, args = list(), dest_refresh = <a href="cloudi_service_api.html#type-dest_refresh">cloudi_service_api:dest_refresh()</a>, timeout_init = <a href="cloudi_service_api.html#type-timeout_milliseconds">cloudi_service_api:timeout_milliseconds()</a>, timeout_async = <a href="cloudi_service_api.html#type-timeout_milliseconds">cloudi_service_api:timeout_milliseconds()</a>, timeout_sync = <a href="cloudi_service_api.html#type-timeout_milliseconds">cloudi_service_api:timeout_milliseconds()</a>, dest_list_deny = <a href="cloudi_service_api.html#type-dest_list">cloudi_service_api:dest_list()</a>, dest_list_allow = <a href="cloudi_service_api.html#type-dest_list">cloudi_service_api:dest_list()</a>, count_process = pos_integer() | float(), max_r = non_neg_integer(), max_t = <a href="cloudi_service_api.html#type-seconds">cloudi_service_api:seconds()</a>, options = <a href="cloudi_service_api.html#type-service_options_internal">cloudi_service_api:service_options_internal()</a>}</tt></p>
<h3 class="typedecl"><a name="type-service_options_external">service_options_external()</a></h3>
<p><tt>service_options_external() = [{priority_default, -128..127} | {queue_limit, undefined | non_neg_integer()} | {queue_size, undefined | pos_integer()} | {dest_refresh_start, <a href="#type-dest_refresh_delay_milliseconds">dest_refresh_delay_milliseconds()</a>} | {dest_refresh_delay, <a href="#type-dest_refresh_delay_milliseconds">dest_refresh_delay_milliseconds()</a>} | {request_name_lookup, sync | async} | {request_timeout_adjustment, boolean()} | {request_timeout_immediate_max, <a href="#type-request_timeout_immediate_max_milliseconds">request_timeout_immediate_max_milliseconds()</a>} | {response_timeout_adjustment, boolean()} | {response_timeout_immediate_max, <a href="#type-response_timeout_immediate_max_milliseconds">response_timeout_immediate_max_milliseconds()</a>} | {count_process_dynamic, [{period, <a href="#type-period_seconds">period_seconds()</a>} | {rate_request_max, number()} | {rate_request_min, number()} | {count_max, number()} | {count_min, number()}] | false} | {scope, atom()} | {monkey_latency, [{time_uniform_min, <a href="#type-latency_time_milliseconds">latency_time_milliseconds()</a>} | {time_uniform_max, <a href="#type-latency_time_milliseconds">latency_time_milliseconds()</a>} | {time_gaussian_mean, <a href="#type-latency_time_milliseconds">latency_time_milliseconds()</a>} | {time_gaussian_stddev, float()} | {time_absolute, <a href="#type-latency_time_milliseconds">latency_time_milliseconds()</a>}] | system | false} | {monkey_chaos, [{probability_request, float()} | {probability_day, float()}] | system | false} | {automatic_loading, boolean()} | {aspects_init_after, [<a href="#type-aspect_init_after_external">aspect_init_after_external()</a>]} | {aspects_request_before, [<a href="#type-aspect_request_before_external">aspect_request_before_external()</a>]} | {aspects_request_after, [<a href="#type-aspect_request_after_external">aspect_request_after_external()</a>]} | {aspects_terminate_before, [<a href="#type-aspect_terminate_before_external">aspect_terminate_before_external()</a>]}]</tt></p>
<h3 class="typedecl"><a name="type-service_options_internal">service_options_internal()</a></h3>
<p><tt>service_options_internal() = [{priority_default, <a href="#type-priority">priority()</a>} | {queue_limit, undefined | non_neg_integer()} | {queue_size, undefined | pos_integer()} | {dest_refresh_start, <a href="#type-dest_refresh_delay_milliseconds">dest_refresh_delay_milliseconds()</a>} | {dest_refresh_delay, <a href="#type-dest_refresh_delay_milliseconds">dest_refresh_delay_milliseconds()</a>} | {request_name_lookup, sync | async} | {request_timeout_adjustment, boolean()} | {request_timeout_immediate_max, <a href="#type-request_timeout_immediate_max_milliseconds">request_timeout_immediate_max_milliseconds()</a>} | {response_timeout_adjustment, boolean()} | {response_timeout_immediate_max, <a href="#type-response_timeout_immediate_max_milliseconds">response_timeout_immediate_max_milliseconds()</a>} | {count_process_dynamic, [{period, <a href="#type-period_seconds">period_seconds()</a>} | {rate_request_max, number()} | {rate_request_min, number()} | {count_max, number()} | {count_min, number()}] | false} | {scope, atom()} | {monkey_latency, [{time_uniform_min, <a href="#type-latency_time_milliseconds">latency_time_milliseconds()</a>} | {time_uniform_max, <a href="#type-latency_time_milliseconds">latency_time_milliseconds()</a>} | {time_gaussian_mean, <a href="#type-latency_time_milliseconds">latency_time_milliseconds()</a>} | {time_gaussian_stddev, float()} | {time_absolute, <a href="#type-latency_time_milliseconds">latency_time_milliseconds()</a>}] | system | false} | {monkey_chaos, [{probability_request, float()} | {probability_day, float()}] | system | false} | {automatic_loading, boolean()} | {aspects_init_after, [<a href="#type-aspect_init_after_internal">aspect_init_after_internal()</a>]} | {aspects_request_before, [<a href="#type-aspect_request_before_internal">aspect_request_before_internal()</a>]} | {aspects_request_after, [<a href="#type-aspect_request_after_internal">aspect_request_after_internal()</a>]} | {aspects_info_before, [<a href="#type-aspect_info_before_internal">aspect_info_before_internal()</a>]} | {aspects_info_after, [<a href="#type-aspect_info_after_internal">aspect_info_after_internal()</a>]} | {aspects_terminate_before, [<a href="#type-aspect_terminate_before_internal">aspect_terminate_before_internal()</a>]} | {application_name, undefined | atom()} | {request_pid_uses, infinity | pos_integer()} | {request_pid_options, [{fullsweep_after, non_neg_integer()} | {min_heap_size, non_neg_integer()} | {min_bin_vheap_size, non_neg_integer()}]} | {info_pid_uses, infinity | pos_integer()} | {info_pid_options, [{fullsweep_after, non_neg_integer()} | {min_heap_size, non_neg_integer()} | {min_bin_vheap_size, non_neg_integer()}]} | {duo_mode, boolean()} | {hibernate, boolean()} | {reload, boolean()}]</tt></p>
<h3 class="typedecl"><a name="type-service_proplist">service_proplist()</a></h3>
<p><tt>service_proplist() = [{type, internal | external} | {prefix, <a href="cloudi.html#type-service_name_pattern">cloudi:service_name_pattern()</a>} | {module, atom() | <a href="file.html#type-filename">file:filename()</a>} | {file_path, <a href="file.html#type-filename">file:filename()</a>} | {args, list()} | {env, [{string(), string()}]} | {dest_refresh, <a href="#type-dest_refresh">dest_refresh()</a>} | {protocol, default | local | tcp | udp} | {buffer_size, default | pos_integer()} | {timeout_init, <a href="#type-timeout_milliseconds">timeout_milliseconds()</a>} | {timeout_async, <a href="#type-timeout_milliseconds">timeout_milliseconds()</a>} | {timeout_sync, <a href="#type-timeout_milliseconds">timeout_milliseconds()</a>} | {dest_list_deny, <a href="#type-dest_list">dest_list()</a>} | {dest_list_allow, <a href="#type-dest_list">dest_list()</a>} | {count_process, pos_integer() | float()} | {count_thread, pos_integer() | float()} | {max_r, non_neg_integer()} | {max_t, <a href="#type-seconds">seconds()</a>} | {options, <a href="#type-service_options_internal">service_options_internal()</a> | <a href="#type-service_options_external">service_options_external()</a>}]</tt></p>
<h3 class="typedecl"><a name="type-timeout_milliseconds">timeout_milliseconds()</a></h3>
<p><tt>timeout_milliseconds() = 101..4294967195</tt></p>
<h2><a name="index">Function Index</a></h2>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#acl-1">acl/1</a></td><td>
<h4><a name="List_all_ACL_entries.">List all ACL entries.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#acl_add-2">acl_add/2</a></td><td>
<h4><a name="Add_ACL_entries.">Add ACL entries.</a></h4>
Add more ACL entries to be later used when starting services.</td></tr>
<tr><td valign="top"><a href="#acl_remove-2">acl_remove/2</a></td><td>
<h4><a name="Remove_ACL_entries.">Remove ACL entries.</a></h4>
Remove ACL entries that are no longer needed.</td></tr>
<tr><td valign="top"><a href="#code_path-1">code_path/1</a></td><td>
<h4><a name="List_all_the_CloudI_Erlang_VM_code_server_search_paths.">List all the CloudI Erlang VM code server search paths.</a></h4>
The order is the same order the directories are searched.</td></tr>
<tr><td valign="top"><a href="#code_path_add-2">code_path_add/2</a></td><td>
<h4><a name="Add_a_directory_to_the_CloudI_Erlang_VM_code_server's_search_paths.">Add a directory to the CloudI Erlang VM code server's search paths.</a></h4>
The path is always appended to the list of search paths (you should not
need to rely on search path order because of unique naming).</td></tr>
<tr><td valign="top"><a href="#code_path_remove-2">code_path_remove/2</a></td><td>
<h4><a name="Remove_a_directory_from_the_CloudI_Erlang_VM_code_server's_search_paths.">Remove a directory from the CloudI Erlang VM code server's search paths.</a></h4>
This doesn't impact any running services, only services that will be
started in the future.</td></tr>
<tr><td valign="top"><a href="#log_redirect-2">log_redirect/2</a></td><td>(<em>Deprecated</em>.) </td></tr>
<tr><td valign="top"><a href="#logging-1">logging/1</a></td><td>
<h4><a name="Provide_the_current_logging_configuration.">Provide the current logging configuration.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#logging_file_set-2">logging_file_set/2</a></td><td>
<h4><a name="Modify_the_current_log_file_path.">Modify the current log file path.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#logging_formatters_set-2">logging_formatters_set/2</a></td><td>
<h4><a name="Set_the_CloudI_log_formatters.">Set the CloudI log formatters.</a></h4>
lager backend (gen_event) modules are supported as 'output' modules and
lager formatter modules are supported with or without an 'output'
module specified.</td></tr>
<tr><td valign="top"><a href="#logging_level_set-2">logging_level_set/2</a></td><td>
<h4><a name="Modify_the_current_loglevel.">Modify the current loglevel.</a></h4>
CloudI uses asynchronous logging with flow control (backpressure
handling) to prevent misbehaving services from causing instability.</td></tr>
<tr><td valign="top"><a href="#logging_redirect_set-2">logging_redirect_set/2</a></td><td>
<h4><a name="Redirect_the_log_output.">Redirect the log output.</a></h4>
Redirect all local log output to a remote CloudI node.</td></tr>
<tr><td valign="top"><a href="#logging_syslog_set-2">logging_syslog_set/2</a></td><td>
<h4><a name="Set_the_CloudI_syslog_configuration.">Set the CloudI syslog configuration.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#loglevel_set-2">loglevel_set/2</a></td><td>(<em>Deprecated</em>.) </td></tr>
<tr><td valign="top"><a href="#nodes-1">nodes/1</a></td><td>
<h4><a name="List_both_the_connected_and_disconnected_CloudI_nodes.">List both the connected and disconnected CloudI nodes.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#nodes_add-2">nodes_add/2</a></td><td>
<h4><a name="Add_CloudI_nodes.">Add CloudI nodes.</a></h4>
Explicitly add a CloudI node name, so that services between all other
CloudI nodes and the added nodes can send each other service requests.</td></tr>
<tr><td valign="top"><a href="#nodes_alive-1">nodes_alive/1</a></td><td>
<h4><a name="List_all_the_CloudI_nodes_known_to_be_connected.">List all the CloudI nodes known to be connected.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#nodes_dead-1">nodes_dead/1</a></td><td>
<h4><a name="List_all_the_CloudI_nodes_that_are_disconnected_but_expected_to_reconnect.">List all the CloudI nodes that are disconnected but expected to reconnect.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#nodes_get-1">nodes_get/1</a></td><td>
<h4><a name="Get_CloudI_nodes_configuration.">Get CloudI nodes configuration.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#nodes_remove-2">nodes_remove/2</a></td><td>
<h4><a name="Explicitly_remove_CloudI_nodes.">Explicitly remove CloudI nodes.</a></h4>
The node must be currently dead to be removed.</td></tr>
<tr><td valign="top"><a href="#nodes_set-2">nodes_set/2</a></td><td>
<h4><a name="Set_CloudI_nodes_configuration.">Set CloudI nodes configuration.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#service_subscriptions-2">service_subscriptions/2</a></td><td>
<h4><a name="Get_a_list_of_all_service_subscriptions.">Get a list of all service subscriptions.</a></h4>
When a subscription on the same service name pattern occurred
multiple times, only a single entry is returned within the list.</td></tr>
<tr><td valign="top"><a href="#services-1">services/1</a></td><td>
<h4><a name="List_all_service_instances_with_each_service's_UUID.">List all service instances with each service's UUID.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#services_add-2">services_add/2</a></td><td>
<h4><a name="Add_service_instances.">Add service instances.</a></h4>
Provide service configuration using the same syntax found in the
configuration file (i.e., /usr/local/etc/cloudi/cloudi.conf).</td></tr>
<tr><td valign="top"><a href="#services_remove-2">services_remove/2</a></td><td>
<h4><a name="Remove_service_instances.">Remove service instances.</a></h4>
Provide the Service UUIDs for the services that should be stopped.</td></tr>
<tr><td valign="top"><a href="#services_restart-2">services_restart/2</a></td><td>
<h4><a name="Restart_service_instances.">Restart service instances.</a></h4>
Provide the Service UUIDs for the services that should be restarted.</td></tr>
<tr><td valign="top"><a href="#services_search-2">services_search/2</a></td><td>
<h4><a name="Search_service_instances_for_matches_on_the_provided_service_name.">Search service instances for matches on the provided service name.</a></h4>
Multiple services may be returned for a single service name.</td></tr>
</table>
<h2><a name="functions">Function Details</a></h2>
<h3 class="function"><a name="acl-1">acl/1</a></h3>
<div class="spec">
<p><tt>acl(Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; {ok, [{atom(), [<a href="cloudi_service.html#type-service_name_pattern">cloudi_service:service_name_pattern()</a>]}]} | {error, timeout | noproc}</tt><br></p>
</div><p>
<h4><a name="List_all_ACL_entries.">List all ACL entries.</a></h4>
</p>
<h3 class="function"><a name="acl_add-2">acl_add/2</a></h3>
<div class="spec">
<p><tt>acl_add(L::[{atom(), <a href="#type-acl">acl()</a>}, ...], Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok | {error, timeout | noproc | <a href="cloudi_core_i_configuration.html#type-error_reason_acl_add">cloudi_core_i_configuration:error_reason_acl_add()</a>}</tt><br></p>
</div><p>
<h4><a name="Add_ACL_entries.">Add ACL entries.</a></h4>
Add more ACL entries to be later used when starting services. An ACL
entry is an Erlang atom() -&gt; list(atom() | string()) relationship which
provides a logical grouping of service name patterns
(e.g., {api, ["/cloudi/api/"]}). When providing a service name pattern
for an ACL entry, a non-pattern will be assumed to be a prefix
(i.e., "/cloudi/api/" == "/cloudi/api/*").</p>
<h3 class="function"><a name="acl_remove-2">acl_remove/2</a></h3>
<div class="spec">
<p><tt>acl_remove(L::[atom(), ...], Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok | {error, timeout | noproc | <a href="cloudi_core_i_configuration.html#type-error_reason_acl_remove">cloudi_core_i_configuration:error_reason_acl_remove()</a>}</tt><br></p>
</div><p>
<h4><a name="Remove_ACL_entries.">Remove ACL entries.</a></h4>
Remove ACL entries that are no longer needed. Running services will
retain their configuration, so this impacts services that are started
in the future.</p>
<h3 class="function"><a name="code_path-1">code_path/1</a></h3>
<div class="spec">
<p><tt>code_path(Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; {ok, [<a href="file.html#type-filename">file:filename()</a>, ...]}</tt><br></p>
</div><p>
<h4><a name="List_all_the_CloudI_Erlang_VM_code_server_search_paths.">List all the CloudI Erlang VM code server search paths.</a></h4>
The order is the same order the directories are searched.</p>
<h3 class="function"><a name="code_path_add-2">code_path_add/2</a></h3>
<div class="spec">
<p><tt>code_path_add(Dir::<a href="file.html#type-filename">file:filename()</a>, Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok | {error, bad_directory}</tt><br></p>
</div><p>
<h4><a name="Add_a_directory_to_the_CloudI_Erlang_VM_code_server's_search_paths.">Add a directory to the CloudI Erlang VM code server's search paths.</a></h4>
The path is always appended to the list of search paths (you should not
need to rely on search path order because of unique naming).</p>
<h3 class="function"><a name="code_path_remove-2">code_path_remove/2</a></h3>
<div class="spec">
<p><tt>code_path_remove(Dir::<a href="file.html#type-filename">file:filename()</a>, Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok | {error, does_not_exist | bad_name}</tt><br></p>
</div><p>
<h4><a name="Remove_a_directory_from_the_CloudI_Erlang_VM_code_server's_search_paths.">Remove a directory from the CloudI Erlang VM code server's search paths.</a></h4>
This doesn't impact any running services, only services that will be
started in the future.</p>
<h3 class="function"><a name="log_redirect-2">log_redirect/2</a></h3>
<div class="spec">
<p><tt>log_redirect(Node::undefined | node(), Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok</tt><br></p>
</div><p><b>This function is deprecated:</b> Use <a href="#logging_redirect_set-2"><code>logging_redirect_set/2</code></a> instead</p>
<h3 class="function"><a name="logging-1">logging/1</a></h3>
<div class="spec">
<p><tt>logging(Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; {ok, <a href="#type-logging_proplist">logging_proplist()</a>} | {error, timeout | noproc}</tt><br></p>
</div><p>
<h4><a name="Provide_the_current_logging_configuration.">Provide the current logging configuration.</a></h4>
</p>
<h3 class="function"><a name="logging_file_set-2">logging_file_set/2</a></h3>
<div class="spec">
<p><tt>logging_file_set(FilePath::string() | undefined, Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok | {error, <a href="file.html#type-posix">file:posix()</a> | badarg | system_limit}</tt><br></p>
</div><p>
<h4><a name="Modify_the_current_log_file_path.">Modify the current log file path.</a></h4>
</p>
<h3 class="function"><a name="logging_formatters_set-2">logging_formatters_set/2</a></h3>
<div class="spec">
<p><tt>logging_formatters_set(L::<a href="#type-logging_formatters_set_proplist">logging_formatters_set_proplist()</a>, Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok | {error, timeout | noproc | <a href="cloudi_core_i_configuration.html#type-error_reason_logging_formatters_set">cloudi_core_i_configuration:error_reason_logging_formatters_set()</a>}</tt><br></p>
</div><p>
<h4><a name="Set_the_CloudI_log_formatters.">Set the CloudI log formatters.</a></h4>
lager backend (gen_event) modules are supported as 'output' modules and
lager formatter modules are supported with or without an 'output'
module specified.</p>
<h3 class="function"><a name="logging_level_set-2">logging_level_set/2</a></h3>
<div class="spec">
<p><tt>logging_level_set(Level::<a href="#type-loglevel">loglevel()</a> | undefined, Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok</tt><br></p>
</div><p>
<h4><a name="Modify_the_current_loglevel.">Modify the current loglevel.</a></h4>
CloudI uses asynchronous logging with flow control (backpressure
handling) to prevent misbehaving services from causing instability.</p>
<h3 class="function"><a name="logging_redirect_set-2">logging_redirect_set/2</a></h3>
<div class="spec">
<p><tt>logging_redirect_set(Node::undefined | node(), Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok</tt><br></p>
</div><p>
<h4><a name="Redirect_the_log_output.">Redirect the log output.</a></h4>
Redirect all local log output to a remote CloudI node.
Use 'undefined' as the node name to log locally.</p>
<h3 class="function"><a name="logging_syslog_set-2">logging_syslog_set/2</a></h3>
<div class="spec">
<p><tt>logging_syslog_set(L::<a href="#type-logging_syslog_set_proplist">logging_syslog_set_proplist()</a>, Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok | {error, timeout | noproc | <a href="cloudi_core_i_configuration.html#type-error_reason_logging_syslog_set">cloudi_core_i_configuration:error_reason_logging_syslog_set()</a>}</tt><br></p>
</div><p>
<h4><a name="Set_the_CloudI_syslog_configuration.">Set the CloudI syslog configuration.</a></h4>
</p>
<h3 class="function"><a name="loglevel_set-2">loglevel_set/2</a></h3>
<div class="spec">
<p><tt>loglevel_set(Level::<a href="#type-loglevel">loglevel()</a>, Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok</tt><br></p>
</div><p><b>This function is deprecated:</b> Use <a href="#logging_level_set-2"><code>logging_level_set/2</code></a> instead</p>
<h3 class="function"><a name="nodes-1">nodes/1</a></h3>
<div class="spec">
<p><tt>nodes(Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; {ok, [node()]} | {error, timeout | noproc}</tt><br></p>
</div><p>
<h4><a name="List_both_the_connected_and_disconnected_CloudI_nodes.">List both the connected and disconnected CloudI nodes.</a></h4>
</p>
<h3 class="function"><a name="nodes_add-2">nodes_add/2</a></h3>
<div class="spec">
<p><tt>nodes_add(L::[node(), ...], Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok | {error, timeout | noproc | <a href="cloudi_core_i_configuration.html#type-error_reason_nodes_add">cloudi_core_i_configuration:error_reason_nodes_add()</a>}</tt><br></p>
</div><p>
<h4><a name="Add_CloudI_nodes.">Add CloudI nodes.</a></h4>
Explicitly add a CloudI node name, so that services between all other
CloudI nodes and the added nodes can send each other service requests.</p>
<h3 class="function"><a name="nodes_alive-1">nodes_alive/1</a></h3>
<div class="spec">
<p><tt>nodes_alive(Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; {ok, [node()]} | {error, timeout | noproc}</tt><br></p>
</div><p>
<h4><a name="List_all_the_CloudI_nodes_known_to_be_connected.">List all the CloudI nodes known to be connected.</a></h4>
</p>
<h3 class="function"><a name="nodes_dead-1">nodes_dead/1</a></h3>
<div class="spec">
<p><tt>nodes_dead(Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; {ok, [node()]} | {error, timeout | noproc}</tt><br></p>
</div><p>
<h4><a name="List_all_the_CloudI_nodes_that_are_disconnected_but_expected_to_reconnect.">List all the CloudI nodes that are disconnected but expected to reconnect.</a></h4>
</p>
<h3 class="function"><a name="nodes_get-1">nodes_get/1</a></h3>
<div class="spec">
<p><tt>nodes_get(Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; {ok, <a href="#type-nodes_proplist">nodes_proplist()</a>} | {error, timeout | noproc}</tt><br></p>
</div><p>
<h4><a name="Get_CloudI_nodes_configuration.">Get CloudI nodes configuration.</a></h4>
</p>
<h3 class="function"><a name="nodes_remove-2">nodes_remove/2</a></h3>
<div class="spec">
<p><tt>nodes_remove(L::[node(), ...], Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok | {error, timeout | noproc | <a href="cloudi_core_i_configuration.html#type-error_reason_nodes_remove">cloudi_core_i_configuration:error_reason_nodes_remove()</a>}</tt><br></p>
</div><p>
<h4><a name="Explicitly_remove_CloudI_nodes.">Explicitly remove CloudI nodes.</a></h4>
The node must be currently dead to be removed.</p>
<h3 class="function"><a name="nodes_set-2">nodes_set/2</a></h3>
<div class="spec">
<p><tt>nodes_set(L::<a href="#type-nodes_proplist">nodes_proplist()</a>, Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok | {error, timeout | noproc | <a href="cloudi_core_i_configuration.html#type-error_reason_nodes_set">cloudi_core_i_configuration:error_reason_nodes_set()</a>}</tt><br></p>
</div><p>
<h4><a name="Set_CloudI_nodes_configuration.">Set CloudI nodes configuration.</a></h4>
</p>
<h3 class="function"><a name="service_subscriptions-2">service_subscriptions/2</a></h3>
<div class="spec">
<p><tt>service_subscriptions(ServiceId::binary() | string(), Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; {ok, [<a href="cloudi_service.html#type-service_name_pattern">cloudi_service:service_name_pattern()</a>]} | {error, timeout | noproc | {service_id_invalid, any()} | not_found}</tt><br></p>
</div><p>
<h4><a name="Get_a_list_of_all_service_subscriptions.">Get a list of all service subscriptions.</a></h4>
When a subscription on the same service name pattern occurred
multiple times, only a single entry is returned within the list.
Service name patterns that are subscriptions of non-service Erlang pids
(e.g., cloudi_service_http_cowboy websocket connection pids) will not
be returned by this function.</p>
<h3 class="function"><a name="services-1">services/1</a></h3>
<div class="spec">
<p><tt>services(Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; {ok, [{<a href="#type-service_id">service_id()</a>, <a href="#type-service_internal">service_internal()</a>} | {<a href="#type-service_id">service_id()</a>, <a href="#type-service_external">service_external()</a>}]} | {error, timeout | noproc}</tt><br></p>
</div><p>
<h4><a name="List_all_service_instances_with_each_service's_UUID.">List all service instances with each service's UUID.</a></h4>
</p>
<h3 class="function"><a name="services_add-2">services_add/2</a></h3>
<div class="spec">
<p><tt>services_add(L::[{internal, term(), term(), term(), term(), term(), term(), term(), term(), term(), term(), term(), term(), term()} | {external, term(), term(), term(), term(), term(), term(), term(), term(), term(), term(), term(), term(), term(), term(), term(), term(), term()} | <a href="#type-service_proplist">service_proplist()</a>, ...], Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; {ok, [<a href="#type-service_id">service_id()</a>, ...]} | {error, timeout | noproc | <a href="cloudi_core_i_configuration.html#type-error_reason_services_add">cloudi_core_i_configuration:error_reason_services_add()</a>}</tt><br></p>
</div><p>
<h4><a name="Add_service_instances.">Add service instances.</a></h4>
Provide service configuration using the same syntax found in the
configuration file (i.e., /usr/local/etc/cloudi/cloudi.conf).</p>
<h3 class="function"><a name="services_remove-2">services_remove/2</a></h3>
<div class="spec">
<p><tt>services_remove(L::[binary() | string(), ...], Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok | {error, timeout | noproc | {service_id_invalid, any()} | <a href="cloudi_core_i_configuration.html#type-error_reason_services_remove">cloudi_core_i_configuration:error_reason_services_remove()</a>}</tt><br></p>
</div><p>
<h4><a name="Remove_service_instances.">Remove service instances.</a></h4>
Provide the Service UUIDs for the services that should be stopped.
The Service UUID is shown in the output of services/1. When the
service is stopped, its running instance is removed from CloudI, but
does not impact any other running instances (even if they are the same
service module or binary).</p>
<h3 class="function"><a name="services_restart-2">services_restart/2</a></h3>
<div class="spec">
<p><tt>services_restart(L::[binary() | string(), ...], Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; ok | {error, timeout | noproc | {service_id_invalid, any()} | <a href="cloudi_core_i_configuration.html#type-error_reason_services_restart">cloudi_core_i_configuration:error_reason_services_restart()</a>}</tt><br></p>
</div><p>
<h4><a name="Restart_service_instances.">Restart service instances.</a></h4>
Provide the Service UUIDs for the services that should be restarted.
The Service UUID is shown in the output of services/1. When the service
is restarted, the old instance is stopped and a new instance is started.
During the restart delay, it is possible to lose queued service
requests and received asynchronous responses. Keeping the state
separate between the service instances is important to prevent failures
within the new instance.</p>
<h3 class="function"><a name="services_search-2">services_search/2</a></h3>
<div class="spec">
<p><tt>services_search(ServiceName::<a href="cloudi.html#type-service_name">cloudi:service_name()</a>, Timeout::<a href="#type-api_timeout_milliseconds">api_timeout_milliseconds()</a>) -&gt; {ok, [{<a href="#type-service_id">service_id()</a>, <a href="#type-service_internal">service_internal()</a>} | {<a href="#type-service_id">service_id()</a>, <a href="#type-service_external">service_external()</a>}]} | {error, timeout | noproc | service_name_invalid}</tt><br></p>
</div><p>
<h4><a name="Search_service_instances_for_matches_on_the_provided_service_name.">Search service instances for matches on the provided service name.</a></h4>
Multiple services may be returned for a single service name. Only service
instances on the local Erlang node are searched. Service names that match
subscriptions of non-service Erlang pids only
(e.g., cloudi_service_http_cowboy websocket connection pids) will not
return the service's configuration with this function.</p>
<hr>
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<p><i>Generated by EDoc, Sep 30 2014, 14:01:30.</i></p>
</body>
</html>