Module cloudi_service_api

CloudI Service API Module

A module that exposes dynamic configuration of CloudI.

Copyright © 2011-2023 Michael Truog

Version: 2.0.7 Oct 26 2023 12:17:23 ------------------------------------------------------------------------

Authors: Michael Truog (mjtruog at protonmail dot com).

Description

CloudI Service API Module

A module that exposes dynamic configuration of CloudI.

Data Types

acl()

acl() = [atom() | cloudi:service_name_pattern()]

api_timeout_milliseconds()

api_timeout_milliseconds() = 101..4294967295 | infinity

args_external()

args_external() = string()

args_internal()

args_internal() = list()

aspect_info_after_internal()

aspect_info_after_internal() = aspect_info_internal()

aspect_info_after_internal_f()

aspect_info_after_internal_f() = aspect_info_internal_f()

aspect_info_before_internal()

aspect_info_before_internal() = aspect_info_internal()

aspect_info_before_internal_f()

aspect_info_before_internal_f() = aspect_info_internal_f()

aspect_info_internal()

aspect_info_internal() = aspect_info_internal_f() | {Module::module(), Function::atom()} | {{Module::module(), Function::atom()}} | {{Module::module(), Function::atom(), Arguments::list()}}

aspect_info_internal_f()

aspect_info_internal_f() = fun((Request::any(), State::any(), Dispatcher::cloudi_service:dispatcher()) -> {ok, StateNew::any()} | {stop, Reason::any(), StateNew::any()})

aspect_init_after_external()

aspect_init_after_external() = aspect_init_after_external_f() | {Module::module(), Function::atom()} | {{Module::module(), Function::atom()}} | {{Module::module(), Function::atom(), Arguments::list()}}

aspect_init_after_external_f()

aspect_init_after_external_f() = fun((CommandLine::[string()], Prefix::cloudi:service_name_pattern(), Timeout::timeout_initialize_value_milliseconds(), State::any()) -> {ok, StateNew::any()} | {stop, Reason::any(), StateNew::any()})

aspect_init_after_internal()

aspect_init_after_internal() = aspect_init_after_internal_f() | {Module::module(), Function::atom()} | {{Module::module(), Function::atom()}} | {{Module::module(), Function::atom(), Arguments::list()}}

aspect_init_after_internal_f()

aspect_init_after_internal_f() = fun((Args::list(), Prefix::cloudi_service:service_name_pattern(), Timeout::timeout_initialize_value_milliseconds(), State::any(), Dispatcher::cloudi_service:dispatcher()) -> {ok, StateNew::any()} | {stop, Reason::any(), StateNew::any()})

aspect_log_after()

aspect_log_after() = aspect_log_f() | {Module::module(), Function::atom()} | {{Module::module(), Function::atom()}} | {{Module::module(), Function::atom(), Arguments::list()}}

aspect_log_before()

aspect_log_before() = aspect_log_f() | {Module::module(), Function::atom()} | {{Module::module(), Function::atom()}} | {{Module::module(), Function::atom(), Arguments::list()}}

aspect_log_f()

aspect_log_f() = fun((Level::loglevel_on(), Timestamp::erlang:timestamp(), Node::node(), Pid::pid(), FileName::nonempty_string(), Line::non_neg_integer(), Function::atom() | undefined, Arity::arity() | undefined, MetaData::[{atom(), any()}] | #{}, LogMessage::iodata()) -> ok)

aspect_request_after_external()

aspect_request_after_external() = aspect_request_after_external_f() | {Module::module(), Function::atom()} | {{Module::module(), Function::atom()}} | {{Module::module(), Function::atom(), Arguments::list()}}

aspect_request_after_external_f()

aspect_request_after_external_f() = fun((RequestType::cloudi_service:request_type(), Name::cloudi_service:service_name(), Pattern::cloudi_service:service_name_pattern(), RequestInfo::cloudi_service:request_info(), Request::cloudi_service:request(), Timeout::cloudi_service:timeout_value_milliseconds(), Priority::cloudi_service:priority(), TransId::cloudi_service:trans_id(), Source::cloudi_service:source(), Result::cloudi_service:request_result(), State::any()) -> {ok, StateNew::any()} | {stop, Reason::any(), StateNew::any()})

aspect_request_after_internal()

aspect_request_after_internal() = aspect_request_after_internal_f() | {Module::module(), Function::atom()} | {{Module::module(), Function::atom()}} | {{Module::module(), Function::atom(), Arguments::list()}}

aspect_request_after_internal_f()

aspect_request_after_internal_f() = fun((RequestType::cloudi_service:request_type(), Name::cloudi_service:service_name(), Pattern::cloudi_service:service_name_pattern(), RequestInfo::cloudi_service:request_info(), Request::cloudi_service:request(), Timeout::cloudi_service:timeout_value_milliseconds(), Priority::cloudi_service:priority(), TransId::cloudi_service:trans_id(), Source::cloudi_service:source(), Result::cloudi_service:request_result(), State::any(), Dispatcher::cloudi_service:dispatcher()) -> {ok, StateNew::any()} | {stop, Reason::any(), StateNew::any()})

aspect_request_before_external()

aspect_request_before_external() = aspect_request_before_external_f() | {Module::module(), Function::atom()} | {{Module::module(), Function::atom()}} | {{Module::module(), Function::atom(), Arguments::list()}}

aspect_request_before_external_f()

aspect_request_before_external_f() = fun((RequestType::cloudi_service:request_type(), Name::cloudi_service:service_name(), Pattern::cloudi_service:service_name_pattern(), RequestInfo::cloudi_service:request_info(), Request::cloudi_service:request(), Timeout::cloudi_service:timeout_value_milliseconds(), Priority::cloudi_service:priority(), TransId::cloudi_service:trans_id(), Source::cloudi_service:source(), State::any()) -> {ok, StateNew::any()} | {stop, Reason::any(), StateNew::any()})

aspect_request_before_internal()

aspect_request_before_internal() = aspect_request_before_internal_f() | {Module::module(), Function::atom()} | {{Module::module(), Function::atom()}} | {{Module::module(), Function::atom(), Arguments::list()}}

aspect_request_before_internal_f()

aspect_request_before_internal_f() = fun((RequestType::cloudi_service:request_type(), Name::cloudi_service:service_name(), Pattern::cloudi_service:service_name_pattern(), RequestInfo::cloudi_service:request_info(), Request::cloudi_service:request(), Timeout::cloudi_service:timeout_value_milliseconds(), Priority::cloudi_service:priority(), TransId::cloudi_service:trans_id(), Source::cloudi_service:source(), State::any(), Dispatcher::cloudi_service:dispatcher()) -> {ok, StateNew::any()} | {stop, Reason::any(), StateNew::any()})

aspect_resume()

aspect_resume() = aspect_resume_f() | {Module::module(), Function::atom()} | {{Module::module(), Function::atom()}} | {{Module::module(), Function::atom(), Arguments::list()}}

aspect_resume_f()

aspect_resume_f() = fun((State::any()) -> {ok, State::any()})

aspect_suspend()

aspect_suspend() = aspect_suspend_f() | {Module::module(), Function::atom()} | {{Module::module(), Function::atom()}} | {{Module::module(), Function::atom(), Arguments::list()}}

aspect_suspend_f()

aspect_suspend_f() = fun((State::any()) -> {ok, State::any()})

aspect_terminate_before_external()

aspect_terminate_before_external() = aspect_terminate_before_external_f() | {Module::module(), Function::atom()} | {{Module::module(), Function::atom()}} | {{Module::module(), Function::atom(), Arguments::list()}}

aspect_terminate_before_external_f()

aspect_terminate_before_external_f() = aspect_terminate_f()

aspect_terminate_before_internal()

aspect_terminate_before_internal() = aspect_terminate_before_internal_f() | {Module::module(), Function::atom()} | {{Module::module(), Function::atom()}} | {{Module::module(), Function::atom(), Arguments::list()}}

aspect_terminate_before_internal_f()

aspect_terminate_before_internal_f() = aspect_terminate_f()

aspect_terminate_f()

aspect_terminate_f() = fun((Reason::any(), Timeout::timeout_terminate_value_milliseconds(), State::any()) -> {ok, State::any()})

availability()

availability() = [48..57 | 46 | 32 | 37, ...]

"< 99.9999998 %"

availability_approx()

availability_approx() = [48..57 | 46 | 32 | 37 | 60, ...]

"126 days 19 hours 1563 seconds 557199569 nanoseconds"

bytes_value()

bytes_value() = pos_integer()

integer count of outages during a time period as an ASCII byte ("X" >= 10 and "|" is the cursor marking the current time)

cgroup_external()

cgroup_external() = undefined | [{name, nonempty_string()} | {parameters, [{nonempty_string(), string()}]} | {update_or_create, boolean()}]

chroot_external()

chroot_external() = file_path() | undefined

code_status()

code_status() = [{build_machine, nonempty_string()} | {build_kernel_version, nonempty_string()} | {build_operating_system, nonempty_string()} | {build_erlang_otp_release, nonempty_string()} | {build_cloudi_time, nonempty_string()} | {build_cloudi_version, nonempty_string()} | {build_cloudi_cxx_compiler_version, nonempty_string()} | {build_cloudi_cxx_dependencies_versions, nonempty_string()} | {build_erts_c_compiler_version, nonempty_string()} | {install_erlang_erts_time, iso8601_seconds()} | {install_erlang_kernel_time, iso8601_seconds()} | {install_erlang_stdlib_time, iso8601_seconds()} | {install_erlang_compiler_time, iso8601_seconds()} | {install_cloudi_time, iso8601_seconds()} | {runtime_erlang_erts_version, nonempty_string()} | {runtime_erlang_kernel_version, nonempty_string()} | {runtime_erlang_stdlib_version, nonempty_string()} | {runtime_erlang_compiler_version, nonempty_string()} | {runtime_erlang_compilation, nonempty_string()} | {runtime_cloudi_version, nonempty_string()} | {runtime_machine_processors, pos_integer()} | {runtime_start, iso8601()} | {runtime_clock, iso8601()} | {runtime_clock_offset, nanoseconds_string_signed()} | {runtime_total, nanoseconds_string()} | {runtime_cloudi_start, iso8601()} | {runtime_cloudi_total, nanoseconds_string()} | {runtime_cloudi_changes, [code_status_runtime_change()]}, ...]

code_status_runtime_change()

code_status_runtime_change() = [{type, internal | external} | {file_age, seconds_string()} | {file_path, file_path()} | {service_ids, [service_id(), ...]}, ...]

dest_list()

dest_list() = acl() | undefined

dest_refresh()

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

dest_refresh_delay_milliseconds()

dest_refresh_delay_milliseconds() = limit_min | limit_max | dest_refresh_delay_value_milliseconds()

dest_refresh_delay_period()

dest_refresh_delay_period() = {1..4294967, seconds | second} | {1..71582, minutes | minute} | {1..1193, hours | hour} | {1..49, days | day} | dest_refresh_delay_milliseconds()

dest_refresh_delay_value_milliseconds()

dest_refresh_delay_value_milliseconds() = 101..4294967295

dest_refresh_start_milliseconds()

dest_refresh_start_milliseconds() = limit_min | limit_max | dest_refresh_start_value_milliseconds()

dest_refresh_start_period()

dest_refresh_start_period() = {1..4294967, seconds | second} | {1..71582, minutes | minute} | {1..1193, hours | hour} | {1..49, days | day} | dest_refresh_start_milliseconds()

dest_refresh_start_value_milliseconds()

dest_refresh_start_value_milliseconds() = 0..4294967295

directory_external()

directory_external() = file_path() | undefined

env_external()

env_external() = [{string(), string()}]

fatal_timeout_delay_milliseconds()

fatal_timeout_delay_milliseconds() = limit_min | limit_max | fatal_timeout_delay_value_milliseconds()

fatal_timeout_delay_period()

fatal_timeout_delay_period() = {1..4294967, seconds | second} | {1..71582, minutes | minute} | {1..1193, hours | hour} | {1..49, days | day} | fatal_timeout_delay_milliseconds()

fatal_timeout_delay_value_milliseconds()

fatal_timeout_delay_value_milliseconds() = 0..4294967295

file_path()

file_path() = nonempty_string()

float_string_ge_0()

float_string_ge_0() = [48..57 | 46, ...]

integer_string_ge_0()

integer_string_ge_0() = [48..57, ...]

"11"

integer_string_gt_0()

integer_string_gt_0() = [48..57, ...]

"0.0"

iso8601()

iso8601() = cloudi_timestamp:iso8601()

iso8601_seconds()

iso8601_seconds() = cloudi_timestamp:iso8601_seconds()

"+3.104690100 seconds"

latency_max_time_milliseconds()

latency_max_time_milliseconds() = limit_min | limit_max | latency_max_time_value_milliseconds()

latency_max_time_period()

latency_max_time_period() = {1..4294967, seconds | second} | {1..71582, minutes | minute} | {1..1193, hours | hour} | {1..49, days | day} | latency_max_time_milliseconds()

latency_max_time_value_milliseconds()

latency_max_time_value_milliseconds() = 1..4294967295

latency_mean_time_milliseconds()

latency_mean_time_milliseconds() = limit_min | limit_max | latency_mean_time_value_milliseconds()

latency_mean_time_period()

latency_mean_time_period() = {1..4294967, seconds | second} | {1..71582, minutes | minute} | {1..1193, hours | hour} | {1..49, days | day} | latency_mean_time_milliseconds()

latency_mean_time_value_milliseconds()

latency_mean_time_value_milliseconds() = 0..4294967295

latency_min_time_milliseconds()

latency_min_time_milliseconds() = limit_min | limit_max | latency_min_time_value_milliseconds()

latency_min_time_period()

latency_min_time_period() = {1..4294967, seconds | second} | {1..71582, minutes | minute} | {1..1193, hours | hour} | {1..49, days | day} | latency_min_time_milliseconds()

latency_min_time_value_milliseconds()

latency_min_time_value_milliseconds() = 0..4294967295

latency_time_milliseconds()

latency_time_milliseconds() = limit_min | limit_max | latency_time_value_milliseconds()

latency_time_period()

latency_time_period() = {1..4294967, seconds | second} | {1..71582, minutes | minute} | {1..1193, hours | hour} | {1..49, days | day} | latency_time_milliseconds()

latency_time_value_milliseconds()

latency_time_value_milliseconds() = 1..4294967295

limit_external()

limit_external() = system | [{limit_external_key(), limit_external_value()}]

limit_external_key()

limit_external_key() = as | core | cpu | data | fsize | memlock | msgqueue | nice | nofile | nproc | rss | rtprio | rttime | sigpending | stack | vmem

limit_external_value()

limit_external_value() = undefined | non_neg_integer() | infinity | [{current, non_neg_integer() | infinity} | {maximum, non_neg_integer() | infinity}]

logging_file_sync_milliseconds()

logging_file_sync_milliseconds() = limit_min | limit_max | logging_file_sync_value_milliseconds()

logging_file_sync_period()

logging_file_sync_period() = {1..60, seconds | second} | logging_file_sync_milliseconds()

logging_file_sync_value_milliseconds()

logging_file_sync_value_milliseconds() = 0..60000

logging_formatters_set_proplist()

logging_formatters_set_proplist() = [{any | [module() | nonempty_string(), ...], [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, max_t()} | {formatter, module() | undefined} | {formatter_config, list()}]}]

logging_proplist()

logging_proplist() = [{file, nonempty_string() | undefined} | {file_sync, logging_file_sync_period()} | {level, loglevel()} | {redirect, node() | undefined} | {syslog, logging_syslog_set_proplist() | undefined} | {stdout, boolean()} | {queue_mode_async, pos_integer()} | {queue_mode_sync, pos_integer()} | {queue_mode_overload, pos_integer()} | {formatters, logging_formatters_set_proplist() | undefined} | {log_time_offset, loglevel()} | {aspects_log_before, [aspect_log_before()]} | {aspects_log_after, [aspect_log_after()]}, ...]

logging_status()

logging_status() = [{queue_mode, async | sync | overload} | {queue_mode_sync_last_start, iso8601()} | {queue_mode_sync_last_start_event, iso8601()} | {queue_mode_sync_last_end, iso8601()} | {queue_mode_sync_last_end_event, iso8601()} | {queue_mode_sync_last_total, nanoseconds_string()} | {queue_mode_overload_last_start, iso8601()} | {queue_mode_overload_last_start_event, iso8601()} | {queue_mode_overload_last_end, iso8601()} | {queue_mode_overload_last_end_event, iso8601()} | {queue_mode_overload_last_total, nanoseconds_string()} | {time_offset_last_change, seconds_change_string()} | {time_offset_last_event, iso8601()} | {file_messages_fatal, integer_string_gt_0()} | {file_messages_error, integer_string_gt_0()} | {file_messages_warn, integer_string_gt_0()} | {file_messages_info, integer_string_gt_0()} | {file_messages_debug, integer_string_gt_0()} | {file_messages_trace, integer_string_gt_0()} | {file_sync_fail_count, integer_string_gt_0()} | {file_sync_fail_types, [atom(), ...]} | {file_write_fail_count, integer_string_gt_0()} | {file_write_fail_types, [atom(), ...]} | {file_read_fail_count, integer_string_gt_0()} | {file_read_fail_types, [atom(), ...]}]

logging_syslog_facility()

logging_syslog_facility() = kernel | user | mail | daemon | auth0 | syslog | print | news | uucp | clock0 | auth1 | ftp | ntp | auth2 | auth3 | clock1 | local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7 | non_neg_integer() | auth | authpriv | cron | kern | lpr | security

logging_syslog_host()

logging_syslog_host() = inet:ip_address() | inet:hostname()

logging_syslog_identity()

logging_syslog_identity() = nonempty_string()

logging_syslog_path()

logging_syslog_path() = nonempty_string()

logging_syslog_port()

logging_syslog_port() = undefined | inet:port_number()

logging_syslog_protocol()

logging_syslog_protocol() = rfc3164 | rfc5424

logging_syslog_set_proplist()

logging_syslog_set_proplist() = [{identity, logging_syslog_identity()} | {facility, logging_syslog_facility()} | {level, loglevel() | undefined} | {transport, logging_syslog_transport()} | {transport_options, logging_syslog_transport_options()} | {protocol, logging_syslog_protocol()} | {path, logging_syslog_path()} | {host, logging_syslog_host()} | {port, logging_syslog_port()}]

logging_syslog_transport()

logging_syslog_transport() = local | udp | tcp | tls

logging_syslog_transport_options()

logging_syslog_transport_options() = list()

loglevel()

loglevel() = loglevel_on() | off

loglevel_on()

loglevel_on() = fatal | error | warn | info | debug | trace

max_heap_size_options()

max_heap_size_options() = non_neg_integer() | #{size => non_neg_integer(), kill => boolean(), error_logger => boolean()}

max_t()

max_t() = period_gte()

module_state_internal()

module_state_internal() = module_state_internal_f() | {Module::module(), Function::atom()} | {{Module::module(), Function::atom()}} | {{Module::module(), Function::atom(), Arguments::list()}}

module_state_internal_f()

module_state_internal_f() = fun((ModuleVersionOld::module_version(), ModuleVersionNew::module_version(), StateOld::any()) -> {ok, StateNew::any()} | {error, Reason::any()})

module_version()

module_version() = [any()]

nanoseconds_string()

nanoseconds_string() = [97..122 | 48..57 | 32, ...]

"+ 350 nanoseconds"

nanoseconds_string_approx_gt()

nanoseconds_string_approx_gt() = [97..122 | 48..57 | 32 | 62, ...]

"< 1563 seconds 557199569 nanoseconds"

nanoseconds_string_approx_lt()

nanoseconds_string_approx_lt() = [97..122 | 48..57 | 32 | 60, ...]

"126 days 19 hours 1563 seconds"

nanoseconds_string_signed()

nanoseconds_string_signed() = [97..122 | 48..57 | 32 | 43 | 45, ...]

"> 126 days 19 hours 1563 seconds 557199569 nanoseconds"

nice_external()

nice_external() = -20..20

node_reconnect_delay_seconds()

node_reconnect_delay_seconds() = period()

node_status()

node_status() = node_status_local() | node_status_remote()

node_status_local()

node_status_local() = [{services_running, integer_string_ge_0()} | {services_restarted, integer_string_ge_0()} | {services_failed, integer_string_ge_0()} | {uptime, nanoseconds_string()} | {uptime_cost_total, float_string_ge_0()} | {uptime_cost_day, float_string_ge_0()} | {uptime_cost_week, float_string_ge_0()} | {uptime_cost_month, float_string_ge_0()} | {uptime_cost_year, float_string_ge_0()} | {availability_day, availability()} | {availability_week, availability()} | {availability_month, availability()} | {availability_year, availability()}, ...]

node_status_remote()

node_status_remote() = [{tracked, nanoseconds_string()} | {tracked_cost_total, float_string_ge_0()} | {tracked_cost_day, float_string_ge_0()} | {tracked_cost_week, float_string_ge_0()} | {tracked_cost_month, float_string_ge_0()} | {tracked_cost_year, float_string_ge_0()} | {connection, visible | hidden} | {tracked_disconnects, integer_string_ge_0()} | {disconnected, boolean()} | {downtime_day_disconnected, nanoseconds_string_approx_gt()} | {downtime_week_disconnected, nanoseconds_string_approx_gt()} | {downtime_month_disconnected, nanoseconds_string_approx_gt()} | {downtime_year_disconnected, nanoseconds_string_approx_gt()} | {outages_day_disconnected, outages_day_string()} | {outages_week_disconnected, outages_week_string()} | {outages_month_disconnected, outages_month_string()} | {outages_year_disconnected, outages_year_string()} | {availability_day, availability_approx()} | {availability_week, availability_approx()} | {availability_month, availability_approx()} | {availability_year, availability_approx()}, ...]

nodes_properties()

nodes_properties() = node() | {nodes, [node()]} | {reconnect_start, node_reconnect_delay_seconds()} | {reconnect_delay, node_reconnect_delay_seconds()} | {listen, visible | all} | {connect, visible | hidden} | {timestamp_type, erlang | os | warp} | {discovery, [{ec2, [{address, inet:ip_address()} | {port, inet:port_number()} | {ttl, non_neg_integer()}]} | {multicast, [{access_key_id, string()} | {secret_access_key, string()} | {ec2_host, string()} | {groups, [string()]} | {tags, [{string(), string()} | string()]}]}]} | {cost, [{node() | default, float()}]} | {cost_precision, 0..253} | {log_reconnect, loglevel()}

nodes_proplist()

nodes_proplist() = [nodes_properties()]

nodes_set_proplist()

nodes_set_proplist() = [{set, all | local} | nodes_properties(), ...]

nodes_status()

nodes_status() = [{node(), node_status()}, ...]

outage_byte()

outage_byte() = 49..57 | 88 | 124 | 32

48 bytes, each represents 30 minutes, with | byte cursor (49 total) first byte time period starts at 00:00 UTC " | "

outages_day_string()

outages_day_string() = [outage_byte(), ...]

42 bytes, each represents 4 hours, with | byte cursor (43 total) first byte time period starts on Monday (ISO 8601) at 00:00 UTC " |1 "

outages_month_string()

outages_month_string() = [outage_byte(), ...]

36 bytes, each represents 1/3rd of a month, with | byte cursor (37 total) " 1 | "

outages_week_string()

outages_week_string() = [outage_byte(), ...]

31 bytes, each represents 1 day of a month, with | byte cursor (32 total) " | 1 "

outages_year_string()

outages_year_string() = [outage_byte(), ...]

"99.9999998 %"

owner_external()

owner_external() = [{user, pos_integer() | string()} | {group, pos_integer() | string()}]

period()

period() = limit_min | limit_max | {1..71582, minutes | minute} | {1..1193, hours | hour} | {1..49, days | day} | period_seconds()

period_gte()

period_gte() = limit_min | {pos_integer(), minutes | minute} | {pos_integer(), hours | hour} | {pos_integer(), days | day} | seconds()

period_seconds()

period_seconds() = 1..4294967

priority()

priority() = -128..127

request_timeout_immediate_max_milliseconds()

request_timeout_immediate_max_milliseconds() = limit_min | limit_max | request_timeout_immediate_max_value_milliseconds()

request_timeout_immediate_max_period()

request_timeout_immediate_max_period() = {1..4294967, seconds | second} | {1..71582, minutes | minute} | {1..1193, hours | hour} | {1..49, days | day} | request_timeout_immediate_max_milliseconds()

request_timeout_immediate_max_value_milliseconds()

request_timeout_immediate_max_value_milliseconds() = 0..4294967295

response_timeout_immediate_max_milliseconds()

response_timeout_immediate_max_milliseconds() = limit_min | limit_max | response_timeout_immediate_max_value_milliseconds()

response_timeout_immediate_max_period()

response_timeout_immediate_max_period() = {1..4294967, seconds | second} | {1..71582, minutes | minute} | {1..1193, hours | hour} | {1..49, days | day} | response_timeout_immediate_max_milliseconds()

response_timeout_immediate_max_value_milliseconds()

response_timeout_immediate_max_value_milliseconds() = 0..4294967295

restart_delay_milliseconds()

restart_delay_milliseconds() = limit_min | limit_max | restart_delay_value_milliseconds()

restart_delay_period()

restart_delay_period() = {1..4294967, seconds | second} | {1..71582, minutes | minute} | {1..1193, hours | hour} | {1..49, days | day} | restart_delay_milliseconds()

restart_delay_value_milliseconds()

restart_delay_value_milliseconds() = 0..4294967295

seconds()

seconds() = non_neg_integer()

seconds_change_string()

seconds_change_string() = [97..122 | 48..57 | 46 | 32 | 43 | 45, ...]

seconds_string()

seconds_string() = [97..122 | 48..57 | 32, ...]

"+ 10 seconds"

seconds_string_signed()

seconds_string_signed() = [97..122 | 48..57 | 32 | 43 | 45, ...]

"0"

service()

service() = #internal{prefix = cloudi:service_name_pattern(), module = atom() | cloudi_service_api:file_path(), args = cloudi_service_api:args_internal(), dest_refresh = cloudi_service_api:dest_refresh(), timeout_init = cloudi_service_api:timeout_initialize_period(), timeout_async = cloudi_service_api:timeout_send_async_period(), timeout_sync = cloudi_service_api:timeout_send_sync_period(), dest_list_deny = cloudi_service_api:dest_list(), dest_list_allow = cloudi_service_api:dest_list(), count_process = pos_integer() | float(), max_r = non_neg_integer(), max_t = cloudi_service_api:max_t(), options = cloudi_service_api:service_options_internal()} | #external{prefix = cloudi:service_name_pattern(), file_path = cloudi_service_api:file_path(), args = cloudi_service_api:args_external(), env = cloudi_service_api:env_external(), dest_refresh = cloudi_service_api:dest_refresh(), protocol = default | local | tcp | udp, buffer_size = default | pos_integer(), timeout_init = cloudi_service_api:timeout_initialize_period(), timeout_async = cloudi_service_api:timeout_send_async_period(), timeout_sync = cloudi_service_api:timeout_send_sync_period(), dest_list_deny = cloudi_service_api:dest_list(), dest_list_allow = cloudi_service_api:dest_list(), count_process = pos_integer() | float(), count_thread = pos_integer() | float(), max_r = non_neg_integer(), max_t = cloudi_service_api:max_t(), options = cloudi_service_api:service_options_external()}

service_external()

service_external() = #external{prefix = cloudi:service_name_pattern(), file_path = cloudi_service_api:file_path(), args = cloudi_service_api:args_external(), env = cloudi_service_api:env_external(), dest_refresh = cloudi_service_api:dest_refresh(), protocol = default | local | tcp | udp, buffer_size = default | pos_integer(), timeout_init = cloudi_service_api:timeout_initialize_period(), timeout_async = cloudi_service_api:timeout_send_async_period(), timeout_sync = cloudi_service_api:timeout_send_sync_period(), dest_list_deny = cloudi_service_api:dest_list(), dest_list_allow = cloudi_service_api:dest_list(), count_process = pos_integer() | float(), count_thread = pos_integer() | float(), max_r = non_neg_integer(), max_t = cloudi_service_api:max_t(), options = cloudi_service_api:service_options_external()}

service_id()

service_id() = <<_:128>>

version 1 UUID (service instance id)

service_internal()

service_internal() = #internal{prefix = cloudi:service_name_pattern(), module = atom() | cloudi_service_api:file_path(), args = cloudi_service_api:args_internal(), dest_refresh = cloudi_service_api:dest_refresh(), timeout_init = cloudi_service_api:timeout_initialize_period(), timeout_async = cloudi_service_api:timeout_send_async_period(), timeout_sync = cloudi_service_api:timeout_send_sync_period(), dest_list_deny = cloudi_service_api:dest_list(), dest_list_allow = cloudi_service_api:dest_list(), count_process = pos_integer() | float(), max_r = non_neg_integer(), max_t = cloudi_service_api:max_t(), options = cloudi_service_api:service_options_internal()}

service_options_count_process_dynamic_options()

service_options_count_process_dynamic_options() = [{period, period()} | {rate_request_max, number()} | {rate_request_min, number()} | {count_max, number()} | {count_min, number()}]

service_options_external()

service_options_external() = [{priority_default, -128..127} | {queue_limit, undefined | non_neg_integer()} | {queue_size, undefined | pos_integer()} | {rate_request_max, service_options_rate_request_max_options() | number() | undefined} | {dest_refresh_start, dest_refresh_start_period()} | {dest_refresh_delay, dest_refresh_delay_period()} | {request_name_lookup, sync | async} | {request_timeout_adjustment, boolean()} | {request_timeout_immediate_max, request_timeout_immediate_max_period()} | {response_timeout_adjustment, boolean()} | {response_timeout_immediate_max, response_timeout_immediate_max_period()} | {count_process_dynamic, service_options_count_process_dynamic_options() | false} | {fatal_exceptions, boolean()} | {fatal_timeout, boolean()} | {fatal_timeout_delay, fatal_timeout_delay_period()} | {timeout_terminate, undefined | timeout_terminate_period()} | {restart_all, boolean()} | {restart_delay, service_options_restart_delay_options() | false} | {scope, atom()} | {monkey_latency, service_options_monkey_latency_options() | system | false} | {monkey_chaos, service_options_monkey_chaos_options() | system | false} | {automatic_loading, boolean()} | {dispatcher_pid_options, [{priority, low | normal | high} | {async_dist, boolean()} | {fullsweep_after, non_neg_integer()} | {min_heap_size, non_neg_integer()} | {min_bin_vheap_size, non_neg_integer()} | {max_heap_size, max_heap_size_options()} | {sensitive, boolean()} | {message_queue_data, off_heap | on_heap}]} | {aspects_init_after, [aspect_init_after_external()]} | {aspects_request_before, [aspect_request_before_external()]} | {aspects_request_after, [aspect_request_after_external()]} | {aspects_terminate_before, [aspect_terminate_before_external()]} | {aspects_suspend, [aspect_suspend()]} | {aspects_resume, [aspect_resume()]} | {limit, limit_external()} | {owner, owner_external()} | {nice, nice_external()} | {cgroup, cgroup_external()} | {chroot, chroot_external()} | {directory, directory_external()}]

service_options_internal()

service_options_internal() = [{priority_default, priority()} | {queue_limit, undefined | non_neg_integer()} | {queue_size, undefined | pos_integer()} | {rate_request_max, service_options_rate_request_max_options() | number() | undefined} | {dest_refresh_start, dest_refresh_start_period()} | {dest_refresh_delay, dest_refresh_delay_period()} | {request_name_lookup, sync | async} | {request_timeout_adjustment, boolean()} | {request_timeout_immediate_max, request_timeout_immediate_max_period()} | {response_timeout_adjustment, boolean()} | {response_timeout_immediate_max, response_timeout_immediate_max_period()} | {count_process_dynamic, service_options_count_process_dynamic_options() | false} | {fatal_exceptions, boolean()} | {fatal_timeout, boolean()} | {fatal_timeout_delay, fatal_timeout_delay_period()} | {timeout_terminate, undefined | timeout_terminate_period()} | {restart_all, boolean()} | {restart_delay, service_options_restart_delay_options() | false} | {scope, atom()} | {monkey_latency, service_options_monkey_latency_options() | system | false} | {monkey_chaos, service_options_monkey_chaos_options() | system | false} | {automatic_loading, boolean()} | {dispatcher_pid_options, [{priority, low | normal | high} | {async_dist, boolean()} | {fullsweep_after, non_neg_integer()} | {min_heap_size, non_neg_integer()} | {min_bin_vheap_size, non_neg_integer()} | {max_heap_size, max_heap_size_options()} | {sensitive, boolean()} | {message_queue_data, off_heap | on_heap}]} | {aspects_init_after, [aspect_init_after_internal()]} | {aspects_request_before, [aspect_request_before_internal()]} | {aspects_request_after, [aspect_request_after_internal()]} | {aspects_info_before, [aspect_info_before_internal()]} | {aspects_info_after, [aspect_info_after_internal()]} | {aspects_terminate_before, [aspect_terminate_before_internal()]} | {aspects_suspend, [aspect_suspend()]} | {aspects_resume, [aspect_resume()]} | {application_name, undefined | atom()} | {init_pid_options, [{priority, low | normal | high} | {async_dist, boolean()} | {fullsweep_after, non_neg_integer()} | {min_heap_size, non_neg_integer()} | {min_bin_vheap_size, non_neg_integer()} | {max_heap_size, max_heap_size_options()} | {sensitive, boolean()} | {message_queue_data, off_heap | on_heap}]} | {request_pid_uses, infinity | pos_integer()} | {request_pid_options, [{priority, low | normal | high} | {async_dist, boolean()} | {fullsweep_after, non_neg_integer()} | {min_heap_size, non_neg_integer()} | {min_bin_vheap_size, non_neg_integer()} | {max_heap_size, max_heap_size_options()} | {sensitive, boolean()} | {message_queue_data, off_heap | on_heap}]} | {info_pid_uses, infinity | pos_integer()} | {info_pid_options, [{priority, low | normal | high} | {async_dist, boolean()} | {fullsweep_after, non_neg_integer()} | {min_heap_size, non_neg_integer()} | {min_bin_vheap_size, non_neg_integer()} | {max_heap_size, max_heap_size_options()} | {sensitive, boolean()} | {message_queue_data, off_heap | on_heap}]} | {duo_mode, boolean()} | {hibernate, service_options_internal_hibernate_options() | boolean()} | {reload, boolean()}]

service_options_internal_hibernate_options()

service_options_internal_hibernate_options() = [{period, period()} | {rate_request_min, number()}]

service_options_monkey_chaos_options()

service_options_monkey_chaos_options() = [{probability_request, float()} | {probability_day, float()}]

service_options_monkey_latency_options()

service_options_monkey_latency_options() = [{time_uniform_min, latency_min_time_period()} | {time_uniform_max, latency_max_time_period()} | {time_gaussian_mean, latency_mean_time_period()} | {time_gaussian_stddev, float() | pos_integer()} | {time_absolute, latency_time_period()}]

service_options_rate_request_max_options()

service_options_rate_request_max_options() = [{period, period()} | {value, number()}]

service_options_restart_delay_options()

service_options_restart_delay_options() = [{time_exponential_min, restart_delay_period()} | {time_exponential_max, restart_delay_period()} | {time_linear_min, restart_delay_period()} | {time_linear_slope, restart_delay_period()} | {time_linear_max, restart_delay_period()} | {time_absolute, restart_delay_period()}]

service_proplist()

service_proplist() = [{type, internal | external} | {prefix, cloudi:service_name_pattern()} | {module, atom() | file_path()} | {file_path, file_path()} | {args, args_internal() | args_external()} | {env, env_external()} | {dest_refresh, dest_refresh()} | {protocol, default | local | tcp | udp} | {buffer_size, default | pos_integer()} | {timeout_init, timeout_initialize_period()} | {timeout_async, timeout_send_async_period()} | {timeout_sync, timeout_send_sync_period()} | {dest_list_deny, dest_list()} | {dest_list_allow, dest_list()} | {count_process, pos_integer() | float()} | {count_thread, pos_integer() | float()} | {max_r, non_neg_integer()} | {max_t, max_t()} | {options, service_options_internal() | service_options_external()}, ...]

service_status()

service_status() = service_status_internal() | service_status_external()

service_status_external()

service_status_external() = [{type, external} | {prefix, cloudi:service_name_pattern()} | {file_path, file_path()} | {count_process, pos_integer()} | {count_thread, pos_integer()} | {pids_os, [pos_integer()]} | {pids_erlang, [pid()]} | {size_erlang, bytes_value()} | {suspended, boolean()} | {uptime_total, nanoseconds_string()} | {uptime_running, nanoseconds_string()} | {uptime_processing, nanoseconds_string_approx_lt()} | {uptime_restarts, integer_string_ge_0()} | {downtime_day_restarting, nanoseconds_string_approx_gt()} | {downtime_week_restarting, nanoseconds_string_approx_gt()} | {downtime_month_restarting, nanoseconds_string_approx_gt()} | {downtime_year_restarting, nanoseconds_string_approx_gt()} | {outages_day_restarting, outages_day_string()} | {outages_week_restarting, outages_week_string()} | {outages_month_restarting, outages_month_string()} | {outages_year_restarting, outages_year_string()} | {interrupt_day_updating, nanoseconds_string_approx_gt()} | {interrupt_week_updating, nanoseconds_string_approx_gt()} | {interrupt_month_updating, nanoseconds_string_approx_gt()} | {interrupt_year_updating, nanoseconds_string_approx_gt()} | {interrupt_day_suspended, nanoseconds_string_approx_gt()} | {interrupt_week_suspended, nanoseconds_string_approx_gt()} | {interrupt_month_suspended, nanoseconds_string_approx_gt()} | {interrupt_year_suspended, nanoseconds_string_approx_gt()} | {availability_day_total, availability_approx()} | {availability_day_running, availability()} | {availability_day_updated, availability_approx()} | {availability_day_processing, availability_approx()} | {availability_week_total, availability_approx()} | {availability_week_running, availability()} | {availability_week_updated, availability_approx()} | {availability_week_processing, availability_approx()} | {availability_month_total, availability_approx()} | {availability_month_running, availability()} | {availability_month_updated, availability_approx()} | {availability_month_processing, availability_approx()} | {availability_year_total, availability_approx()} | {availability_year_running, availability()} | {availability_year_updated, availability_approx()} | {availability_year_processing, availability_approx()}, ...]

service_status_internal()

service_status_internal() = [{type, internal} | {prefix, cloudi:service_name_pattern()} | {module, atom()} | {count_process, pos_integer()} | {pids_erlang, [pid()]} | {size_erlang, bytes_value()} | {suspended, boolean()} | {uptime_total, nanoseconds_string()} | {uptime_running, nanoseconds_string()} | {uptime_processing, nanoseconds_string_approx_lt()} | {uptime_restarts, integer_string_ge_0()} | {downtime_day_restarting, nanoseconds_string_approx_gt()} | {downtime_week_restarting, nanoseconds_string_approx_gt()} | {downtime_month_restarting, nanoseconds_string_approx_gt()} | {downtime_year_restarting, nanoseconds_string_approx_gt()} | {outages_day_restarting, outages_day_string()} | {outages_week_restarting, outages_week_string()} | {outages_month_restarting, outages_month_string()} | {outages_year_restarting, outages_year_string()} | {interrupt_day_updating, nanoseconds_string_approx_gt()} | {interrupt_week_updating, nanoseconds_string_approx_gt()} | {interrupt_month_updating, nanoseconds_string_approx_gt()} | {interrupt_year_updating, nanoseconds_string_approx_gt()} | {interrupt_day_suspended, nanoseconds_string_approx_gt()} | {interrupt_week_suspended, nanoseconds_string_approx_gt()} | {interrupt_month_suspended, nanoseconds_string_approx_gt()} | {interrupt_year_suspended, nanoseconds_string_approx_gt()} | {availability_day_total, availability_approx()} | {availability_day_running, availability()} | {availability_day_updated, availability_approx()} | {availability_day_processing, availability_approx()} | {availability_week_total, availability_approx()} | {availability_week_running, availability()} | {availability_week_updated, availability_approx()} | {availability_week_processing, availability_approx()} | {availability_month_total, availability_approx()} | {availability_month_running, availability()} | {availability_month_updated, availability_approx()} | {availability_month_processing, availability_approx()} | {availability_year_total, availability_approx()} | {availability_year_running, availability()} | {availability_year_updated, availability_approx()} | {availability_year_processing, availability_approx()}, ...]

service_update_plan()

service_update_plan() = service_update_plan_internal() | service_update_plan_external()

service_update_plan_external()

service_update_plan_external() = [{type, external} | {file_path, file_path()} | {args, string()} | {env, [{string(), string()}]} | {sync, boolean()} | {modules_load, [atom()]} | {modules_unload, [atom()]} | {code_paths_add, [string()]} | {code_paths_remove, [string()]} | {dest_refresh, dest_refresh()} | {timeout_init, timeout_initialize_period()} | {timeout_async, timeout_send_async_period()} | {timeout_sync, timeout_send_sync_period()} | {dest_list_deny, dest_list()} | {dest_list_allow, dest_list()} | {options, service_update_plan_options_external()}, ...]

service_update_plan_internal()

service_update_plan_internal() = [{type, internal} | {module, atom()} | {module_state, module_state_internal()} | {sync, boolean()} | {modules_load, [atom()]} | {modules_unload, [atom()]} | {code_paths_add, [string()]} | {code_paths_remove, [string()]} | {dest_refresh, dest_refresh()} | {timeout_init, timeout_initialize_period()} | {timeout_async, timeout_send_async_period()} | {timeout_sync, timeout_send_sync_period()} | {dest_list_deny, dest_list()} | {dest_list_allow, dest_list()} | {options, service_update_plan_options_internal()}, ...]

service_update_plan_options_external()

service_update_plan_options_external() = [{priority_default, -128..127} | {queue_limit, undefined | non_neg_integer()} | {queue_size, undefined | pos_integer()} | {rate_request_max, service_options_rate_request_max_options() | number() | undefined} | {dest_refresh_start, dest_refresh_start_period()} | {dest_refresh_delay, dest_refresh_delay_period()} | {request_name_lookup, sync | async} | {request_timeout_adjustment, boolean()} | {request_timeout_immediate_max, request_timeout_immediate_max_period()} | {response_timeout_adjustment, boolean()} | {response_timeout_immediate_max, response_timeout_immediate_max_period()} | {fatal_exceptions, boolean()} | {fatal_timeout, boolean()} | {fatal_timeout_delay, fatal_timeout_delay_period()} | {monkey_latency, service_options_monkey_latency_options() | system | false} | {monkey_chaos, service_options_monkey_chaos_options() | system | false} | {dispatcher_pid_options, [{priority, low | normal | high} | {async_dist, boolean()} | {fullsweep_after, non_neg_integer()} | {min_heap_size, non_neg_integer()} | {min_bin_vheap_size, non_neg_integer()} | {max_heap_size, max_heap_size_options()} | {sensitive, boolean()} | {message_queue_data, off_heap | on_heap}]} | {aspects_init_after, [aspect_init_after_external()]} | {aspects_request_before, [aspect_request_before_external()]} | {aspects_request_after, [aspect_request_after_external()]} | {aspects_terminate_before, [aspect_terminate_before_external()]} | {aspects_suspend, [aspect_suspend()]} | {aspects_resume, [aspect_resume()]}]

service_update_plan_options_internal()

service_update_plan_options_internal() = [{priority_default, priority()} | {queue_limit, undefined | non_neg_integer()} | {queue_size, undefined | pos_integer()} | {rate_request_max, service_options_rate_request_max_options() | number() | undefined} | {dest_refresh_start, dest_refresh_start_period()} | {dest_refresh_delay, dest_refresh_delay_period()} | {request_name_lookup, sync | async} | {request_timeout_adjustment, boolean()} | {request_timeout_immediate_max, request_timeout_immediate_max_period()} | {response_timeout_adjustment, boolean()} | {response_timeout_immediate_max, response_timeout_immediate_max_period()} | {fatal_exceptions, boolean()} | {fatal_timeout, boolean()} | {fatal_timeout_delay, fatal_timeout_delay_period()} | {monkey_latency, service_options_monkey_latency_options() | system | false} | {monkey_chaos, service_options_monkey_chaos_options() | system | false} | {dispatcher_pid_options, [{priority, low | normal | high} | {async_dist, boolean()} | {fullsweep_after, non_neg_integer()} | {min_heap_size, non_neg_integer()} | {min_bin_vheap_size, non_neg_integer()} | {max_heap_size, max_heap_size_options()} | {sensitive, boolean()} | {message_queue_data, off_heap | on_heap}]} | {aspects_init_after, [aspect_init_after_internal()]} | {aspects_request_before, [aspect_request_before_internal()]} | {aspects_request_after, [aspect_request_after_internal()]} | {aspects_info_before, [aspect_info_before_internal()]} | {aspects_info_after, [aspect_info_after_internal()]} | {aspects_terminate_before, [aspect_terminate_before_internal()]} | {aspects_suspend, [aspect_suspend()]} | {aspects_resume, [aspect_resume()]} | {init_pid_options, [{priority, low | normal | high} | {async_dist, boolean()} | {fullsweep_after, non_neg_integer()} | {min_heap_size, non_neg_integer()} | {min_bin_vheap_size, non_neg_integer()} | {max_heap_size, max_heap_size_options()} | {sensitive, boolean()} | {message_queue_data, off_heap | on_heap}]} | {request_pid_uses, infinity | pos_integer()} | {request_pid_options, [{priority, low | normal | high} | {async_dist, boolean()} | {fullsweep_after, non_neg_integer()} | {min_heap_size, non_neg_integer()} | {min_bin_vheap_size, non_neg_integer()} | {max_heap_size, max_heap_size_options()} | {sensitive, boolean()} | {message_queue_data, off_heap | on_heap}]} | {info_pid_uses, infinity | pos_integer()} | {info_pid_options, [{priority, low | normal | high} | {async_dist, boolean()} | {fullsweep_after, non_neg_integer()} | {min_heap_size, non_neg_integer()} | {min_bin_vheap_size, non_neg_integer()} | {max_heap_size, max_heap_size_options()} | {sensitive, boolean()} | {message_queue_data, off_heap | on_heap}]} | {hibernate, [{period, period()} | {rate_request_min, number()}] | boolean()} | {reload, boolean()}]

syscall_lock_external()

syscall_lock_external() = undefined | [{type, syscall_lock_external_type()} | {names, [nonempty_string(), ...]}]

syscall_lock_external_type()

syscall_lock_external_type() = pledge | function

timeout_initialize_milliseconds()

timeout_initialize_milliseconds() = limit_min | limit_max | timeout_initialize_value_milliseconds()

timeout_initialize_period()

timeout_initialize_period() = {1..4294967295, seconds | second} | {1..4294967295, minutes | minute} | {1..4294967295, hours | hour} | {1..4294967295, days | day} | timeout_initialize_milliseconds()

timeout_initialize_value_milliseconds()

timeout_initialize_value_milliseconds() = 101..4294967195

timeout_send_async_milliseconds()

timeout_send_async_milliseconds() = limit_min | limit_max | timeout_send_async_value_milliseconds()

timeout_send_async_period()

timeout_send_async_period() = {1..4294967, seconds | second} | {1..71582, minutes | minute} | {1..1193, hours | hour} | {1..49, days | day} | timeout_send_async_milliseconds()

timeout_send_async_value_milliseconds()

timeout_send_async_value_milliseconds() = 499..4294967295

timeout_send_sync_milliseconds()

timeout_send_sync_milliseconds() = limit_min | limit_max | timeout_send_sync_value_milliseconds()

timeout_send_sync_period()

timeout_send_sync_period() = {1..4294967, seconds | second} | {1..71582, minutes | minute} | {1..1193, hours | hour} | {1..49, days | day} | timeout_send_sync_milliseconds()

timeout_send_sync_value_milliseconds()

timeout_send_sync_value_milliseconds() = 499..4294967295

timeout_terminate_milliseconds()

timeout_terminate_milliseconds() = limit_min | limit_max | timeout_terminate_value_milliseconds()

timeout_terminate_period()

timeout_terminate_period() = {1..60, seconds | second} | timeout_terminate_milliseconds()

timeout_terminate_value_milliseconds()

timeout_terminate_value_milliseconds() = 10..60000

Function Index

acl/1

List all ACL entries.

.
acl_add/2

Add ACL entries.

Add more ACL entries to be later used when starting services.
acl_remove/2

Remove ACL entries.

Remove ACL entries that are no longer needed.
code_path/1

List all the CloudI Erlang VM code server search paths.

The order is the same order the directories are searched.
code_path_add/2

Add a directory to the CloudI Erlang VM code server's search paths.

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).
code_path_remove/2

Remove a directory from the CloudI Erlang VM code server's search paths.

This doesn't impact any running services, only services that will be started in the future.
code_status/1

Provide the current CloudI Erlang VM code status.

Both build and runtime information is provided with the service files changed after CloudI was started (probably due to service updates).
logging/1

Provide the current logging configuration.

.
logging_file_set/2

Modify the current log file path.

.
logging_formatters_set/2

Set the CloudI log formatters.

lager backend (gen_event) modules are supported as 'output' modules and lager formatter modules are supported with or without an 'output' module specified.
logging_level_set/2

Modify the current loglevel.

CloudI uses asynchronous logging with flow control (backpressure handling) to prevent misbehaving services from causing instability.
logging_redirect_set/2

Redirect the log output.

Redirect all local log output to a remote CloudI node.
logging_set/2

Set CloudI logging configuration.

.
logging_status/1

Provide the current logging status.

.
logging_status_reset/1

Reset the logging status.

.
logging_stdout_set/2

Modify the current log stdout usage.

.
logging_syslog_set/2

Set the CloudI syslog configuration.

.
nodes/1

List both the connected and disconnected CloudI nodes.

.
nodes_add/2

Add CloudI nodes.

Explicitly add a CloudI node name, so that services between all other CloudI nodes and the added nodes can send each other service requests.
nodes_alive/1

List all the CloudI nodes known to be connected.

.
nodes_dead/1

List all the CloudI nodes that are disconnected but expected to reconnect.

.
nodes_get/1

Get CloudI nodes configuration.

.
nodes_remove/2

Explicitly remove CloudI nodes.

The node must be currently dead to be removed.
nodes_set/2

Set CloudI nodes configuration.

.
nodes_status/2

List the current status of specific nodes.

.
service_subscriptions/2

Get a list of all service subscriptions.

When a subscription on the same service name pattern occurred multiple times, only a single entry is returned within the list.
services/1

List all service instances with each service's UUID.

.
services_add/2

Add service instances.

Provide service configuration using the same syntax found in the configuration file (i.e., /usr/local/etc/cloudi/cloudi.conf).
services_remove/2

Remove service instances.

Provide the Service UUIDs for the services that should be stopped.
services_restart/2

Restart service instances.

Provide the Service UUIDs for the services that should be restarted.
services_resume/2

Resume service instances.

Provide the Service UUIDs for the services that should be resumed.
services_search/2

Search service instances for matches on the provided service name.

Multiple services may be returned for a single service name.
services_status/2

List the current status of specific services.

.
services_suspend/2

Suspend service instances.

Provide the Service UUIDs for the services that should be suspended.
services_update/2

Update service instances.

Update service instances without losing service requests and other service-specific data within the Erlang VM.

Function Details

acl/1

acl(Timeout::api_timeout_milliseconds()) -> {ok, [{atom(), [cloudi_service:service_name_pattern()]}]} | {error, timeout | noproc | shutdown}

List all ACL entries.

acl_add/2

acl_add(L::[{atom(), acl()}, ...], Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | shutdown | cloudi_core_i_configuration:error_reason_acl_add()}

Add ACL entries.

Add more ACL entries to be later used when starting services. An ACL entry is an Erlang atom() -> 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/*").

acl_remove/2

acl_remove(L::[atom(), ...], Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | shutdown | cloudi_core_i_configuration:error_reason_acl_remove()}

Remove ACL entries.

Remove ACL entries that are no longer needed. Running services will retain their configuration, so this impacts services that are started in the future.

code_path/1

code_path(Timeout::api_timeout_milliseconds()) -> {ok, [file_path(), ...]} | {error, timeout | noproc | shutdown}

List all the CloudI Erlang VM code server search paths.

The order is the same order the directories are searched.

code_path_add/2

code_path_add(Dir::file_path(), Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | shutdown | cloudi_core_i_configuration:error_reason_code_path_add()}

Add a directory to the CloudI Erlang VM code server's search paths.

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).

code_path_remove/2

code_path_remove(Dir::file_path(), Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | shutdown | cloudi_core_i_configuration:error_reason_code_path_remove()}

Remove a directory from the CloudI Erlang VM code server's search paths.

This doesn't impact any running services, only services that will be started in the future.

code_status/1

code_status(Timeout::api_timeout_milliseconds()) -> {ok, code_status()} | {error, timeout | noproc | shutdown | cloudi_core_i_configuration:error_reason_code_status()}

Provide the current CloudI Erlang VM code status.

Both build and runtime information is provided with the service files changed after CloudI was started (probably due to service updates).

logging/1

logging(Timeout::api_timeout_milliseconds()) -> {ok, logging_proplist()} | {error, timeout | noproc | shutdown}

Provide the current logging configuration.

logging_file_set/2

logging_file_set(FilePath::string() | undefined, Timeout::api_timeout_milliseconds()) -> ok | {error, file:posix() | badarg | system_limit}

Modify the current log file path.

logging_formatters_set/2

logging_formatters_set(L::logging_formatters_set_proplist() | undefined, Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | shutdown | cloudi_core_i_configuration:error_reason_logging_formatters_set()}

Set the CloudI log formatters.

lager backend (gen_event) modules are supported as 'output' modules and lager formatter modules are supported with or without an 'output' module specified.

logging_level_set/2

logging_level_set(Level::loglevel() | undefined, Timeout::api_timeout_milliseconds()) -> ok

Modify the current loglevel.

CloudI uses asynchronous logging with flow control (backpressure handling) to prevent misbehaving services from causing instability.

logging_redirect_set/2

logging_redirect_set(Node::undefined | node(), Timeout::api_timeout_milliseconds()) -> ok

Redirect the log output.

Redirect all local log output to a remote CloudI node. Use 'undefined' as the node name to log locally.

logging_set/2

logging_set(L::logging_proplist(), Timeout::api_timeout_milliseconds()) -> ok | {error, file:posix() | badarg | system_limit}

Set CloudI logging configuration.

logging_status/1

logging_status(Timeout::api_timeout_milliseconds()) -> {ok, logging_status()} | {error, timeout | noproc | shutdown}

Provide the current logging status.

logging_status_reset/1

logging_status_reset(Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | shutdown}

Reset the logging status.

logging_stdout_set/2

logging_stdout_set(Stdout::boolean(), Timeout::api_timeout_milliseconds()) -> ok

Modify the current log stdout usage.

logging_syslog_set/2

logging_syslog_set(L::logging_syslog_set_proplist() | undefined, Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | shutdown | cloudi_core_i_configuration:error_reason_logging_syslog_set()}

Set the CloudI syslog configuration.

nodes/1

nodes(Timeout::api_timeout_milliseconds()) -> {ok, [node()]} | {error, timeout | noproc | shutdown}

List both the connected and disconnected CloudI nodes.

nodes_add/2

nodes_add(L::[node(), ...], Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | shutdown | cloudi_core_i_configuration:error_reason_nodes_add()}

Add CloudI nodes.

Explicitly add a CloudI node name, so that services between all other CloudI nodes and the added nodes can send each other service requests.

nodes_alive/1

nodes_alive(Timeout::api_timeout_milliseconds()) -> {ok, [node()]} | {error, timeout | noproc | shutdown}

List all the CloudI nodes known to be connected.

nodes_dead/1

nodes_dead(Timeout::api_timeout_milliseconds()) -> {ok, [node()]} | {error, timeout | noproc | shutdown}

List all the CloudI nodes that are disconnected but expected to reconnect.

nodes_get/1

nodes_get(Timeout::api_timeout_milliseconds()) -> {ok, nodes_proplist()} | {error, timeout | noproc | shutdown}

Get CloudI nodes configuration.

nodes_remove/2

nodes_remove(L::[node(), ...], Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | shutdown | cloudi_core_i_configuration:error_reason_nodes_remove()}

Explicitly remove CloudI nodes.

The node must be currently dead to be removed.

nodes_set/2

nodes_set(L::nodes_set_proplist(), Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | shutdown | cloudi_core_i_configuration:error_reason_nodes_set()}

Set CloudI nodes configuration.

nodes_status/2

nodes_status(L::[node()], Timeout::api_timeout_milliseconds()) -> {ok, nodes_status()} | {error, timeout | noproc | shutdown | {node_not_found, any()}}

List the current status of specific nodes.

service_subscriptions/2

service_subscriptions(ServiceId::binary() | string(), Timeout::api_timeout_milliseconds()) -> {ok, [cloudi_service:service_name_pattern()]} | {error, timeout | noproc | shutdown | {service_id_invalid, any()} | not_found}

Get a list of all service subscriptions.

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.

services/1

services(Timeout::api_timeout_milliseconds()) -> {ok, [{service_id(), service_internal()} | {service_id(), service_external()}]} | {error, timeout | noproc | shutdown}

List all service instances with each service's UUID.

services_add/2

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()} | service_proplist(), ...], Timeout::api_timeout_milliseconds()) -> {ok, [service_id(), ...]} | {error, timeout | noproc | shutdown | cloudi_core_i_configuration:error_reason_services_add()}

Add service instances.

Provide service configuration using the same syntax found in the configuration file (i.e., /usr/local/etc/cloudi/cloudi.conf).

services_remove/2

services_remove(L::[binary() | string(), ...], Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | shutdown | {service_id_invalid, any()} | cloudi_core_i_configuration:error_reason_services_remove()}

Remove service instances.

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).

services_restart/2

services_restart(L::[binary() | string(), ...], Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | shutdown | {service_id_invalid, any()} | cloudi_core_i_configuration:error_reason_services_restart()}

Restart service instances.

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.

services_resume/2

services_resume(L::[binary() | string(), ...], Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | shutdown | {service_id_invalid, any()} | cloudi_core_i_configuration:error_reason_services_resume()}

Resume service instances.

Provide the Service UUIDs for the services that should be resumed. The Service UUID is shown in the output of services/1.

services_search/2

services_search(Name::{atom(), cloudi:service_name()} | cloudi:service_name(), Timeout::api_timeout_milliseconds()) -> {ok, [{service_id(), service_internal()} | {service_id(), service_external()}]} | {error, timeout | noproc | shutdown | service_name_invalid | cloudi_core_i_configuration:error_reason_services_search()}

Search service instances for matches on the provided service name.

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. Provide a scope within a 2 element tuple with the service name to check a custom scope.

services_status/2

services_status(L::[binary() | string()], Timeout::api_timeout_milliseconds()) -> {ok, [{service_id(), service_status()}, ...]} | {error, timeout | noproc | shutdown | {service_id_invalid, any()} | {service_not_found, any()}}

List the current status of specific services.

services_suspend/2

services_suspend(L::[binary() | string(), ...], Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | shutdown | {service_id_invalid, any()} | cloudi_core_i_configuration:error_reason_services_suspend()}

Suspend service instances.

Provide the Service UUIDs for the services that should be suspended. The Service UUID is shown in the output of services/1.

services_update/2

services_update(L::[{string() | binary(), service_update_plan()}, ...], Timeout::api_timeout_milliseconds()) -> {ok, ServiceIdsSetsSuccess::[[service_id(), ...], ...]} | {error, {ServiceIdsSetError::[service_id(), ...], Reason::{service_internal_update_failed | service_external_update_failed, any()}}, ServiceIdsSetsSuccess::[[service_id(), ...], ...]} | {error, timeout | noproc | shutdown | {service_id_invalid, any()} | cloudi_core_i_configuration:error_reason_services_update()}

Update service instances.

Update service instances without losing service requests and other service-specific data within the Erlang VM.


Generated by EDoc