Module cloudi_service_api

CloudI Service API Module

A module that exposes dynamic configuration of CloudI.

Copyright © 2011-2017 Michael Truog

Version: 1.6.1 Mar 28 2017 19:21:38 ------------------------------------------------------------------------

Authors: Michael Truog (mjtruog [at] gmail (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

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()}}

aspect_info_internal_f()

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

aspect_init_after_external()

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

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, NewState::any()} | {stop, Reason::any(), NewState::any()})

aspect_init_after_internal()

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

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, NewState::any()} | {stop, Reason::any(), NewState::any()})

aspect_log_after()

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

aspect_log_before()

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

aspect_log_f()

aspect_log_f() = fun((Level::loglevel_on(), Timestamp::erlang:timestamp(), Node::node(), Pid::pid(), Module::module(), Line::pos_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()}}

aspect_request_after_external_f()

aspect_request_after_external_f() = fun((Type::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, NewState::any()} | {stop, Reason::any(), NewState::any()})

aspect_request_after_internal()

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

aspect_request_after_internal_f()

aspect_request_after_internal_f() = fun((Type::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, NewState::any()} | {stop, Reason::any(), NewState::any()})

aspect_request_before_external()

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

aspect_request_before_external_f()

aspect_request_before_external_f() = fun((Type::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, NewState::any()} | {stop, Reason::any(), NewState::any()})

aspect_request_before_internal()

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

aspect_request_before_internal_f()

aspect_request_before_internal_f() = fun((Type::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, NewState::any()} | {stop, Reason::any(), NewState::any()})

aspect_terminate_before_external()

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

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()}}

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()})

cgroup_external()

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

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() = 101..4294967295

directory_external()

directory_external() = file:filename() | undefined

latency_max_time_milliseconds()

latency_max_time_milliseconds() = limit_min | limit_max | latency_max_time_value_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_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_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_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_formatters_set_proplist()

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, cloudi_service_api:seconds()} | {formatter, module() | undefined} | {formatter_config, list()}]}]

logging_proplist()

logging_proplist() = [{file, string() | undefined} | {stdout, boolean()} | {level, loglevel()} | {redirect, node() | undefined} | {syslog, logging_syslog_set_proplist() | undefined} | {formatters, logging_formatters_set_proplist() | undefined} | {aspects_log_before, [aspect_log_before()]} | {aspects_log_after, [aspect_log_after()]}, ...]

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()}

module_state_internal()

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

module_state_internal_f()

module_state_internal_f() = fun((OldModuleVersion::module_version(), NewModuleVersion::module_version(), OldState::any()) -> {ok, NewState::any()} | {error, Reason::any()})

module_version()

module_version() = [any()]

nice_external()

nice_external() = -20..20

node_reconnect_delay_seconds()

node_reconnect_delay_seconds() = period_seconds()

nodes_proplist()

nodes_proplist() = [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} | {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()]}]}]}, ...]

owner_external()

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

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_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_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_value_milliseconds()

restart_delay_value_milliseconds() = 0..4294967295

seconds()

seconds() = non_neg_integer()

service()

service() = #internal{prefix = cloudi:service_name_pattern(), module = atom() | file:filename(), args = list(), dest_refresh = cloudi_service_api:dest_refresh(), timeout_init = cloudi_service_api:timeout_initialize_milliseconds(), timeout_async = cloudi_service_api:timeout_send_async_milliseconds(), timeout_sync = cloudi_service_api:timeout_send_sync_milliseconds(), 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:seconds(), options = cloudi_service_api:service_options_internal()} | #external{prefix = cloudi:service_name_pattern(), file_path = file:filename(), args = string(), env = [{string(), string()}], dest_refresh = cloudi_service_api:dest_refresh(), protocol = default | local | tcp | udp, buffer_size = default | pos_integer(), timeout_init = cloudi_service_api:timeout_initialize_milliseconds(), timeout_async = cloudi_service_api:timeout_send_async_milliseconds(), timeout_sync = cloudi_service_api:timeout_send_sync_milliseconds(), 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:seconds(), options = cloudi_service_api:service_options_external()}

service_external()

service_external() = #external{prefix = cloudi:service_name_pattern(), file_path = file:filename(), args = string(), env = [{string(), string()}], dest_refresh = cloudi_service_api:dest_refresh(), protocol = default | local | tcp | udp, buffer_size = default | pos_integer(), timeout_init = cloudi_service_api:timeout_initialize_milliseconds(), timeout_async = cloudi_service_api:timeout_send_async_milliseconds(), timeout_sync = cloudi_service_api:timeout_send_sync_milliseconds(), 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:seconds(), 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() | file:filename(), args = list(), dest_refresh = cloudi_service_api:dest_refresh(), timeout_init = cloudi_service_api:timeout_initialize_milliseconds(), timeout_async = cloudi_service_api:timeout_send_async_milliseconds(), timeout_sync = cloudi_service_api:timeout_send_sync_milliseconds(), 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:seconds(), options = cloudi_service_api:service_options_internal()}

service_options_external()

service_options_external() = [{priority_default, -128..127} | {queue_limit, undefined | non_neg_integer()} | {queue_size, undefined | pos_integer()} | {rate_request_max, [{period, period_seconds()} | {value, number()}] | number() | undefined} | {dest_refresh_start, dest_refresh_delay_milliseconds()} | {dest_refresh_delay, dest_refresh_delay_milliseconds()} | {request_name_lookup, sync | async} | {request_timeout_adjustment, boolean()} | {request_timeout_immediate_max, request_timeout_immediate_max_milliseconds()} | {response_timeout_adjustment, boolean()} | {response_timeout_immediate_max, response_timeout_immediate_max_milliseconds()} | {count_process_dynamic, [{period, period_seconds()} | {rate_request_max, number()} | {rate_request_min, number()} | {count_max, number()} | {count_min, number()}] | false} | {timeout_terminate, undefined | timeout_terminate_milliseconds()} | {restart_delay, [{time_exponential_min, restart_delay_milliseconds()} | {time_exponential_max, restart_delay_milliseconds()} | {time_linear_min, restart_delay_milliseconds()} | {time_linear_slope, restart_delay_milliseconds()} | {time_linear_max, restart_delay_milliseconds()} | {time_absolute, restart_delay_milliseconds()}] | false} | {scope, atom()} | {monkey_latency, [{time_uniform_min, latency_min_time_milliseconds()} | {time_uniform_max, latency_max_time_milliseconds()} | {time_gaussian_mean, latency_mean_time_milliseconds()} | {time_gaussian_stddev, float() | pos_integer()} | {time_absolute, latency_time_milliseconds()}] | system | false} | {monkey_chaos, [{probability_request, float()} | {probability_day, float()}] | system | false} | {automatic_loading, boolean()} | {dispatcher_pid_options, [{priority, low | normal | high} | {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 | mixed}]} | {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()]} | {limit, limit_external()} | {owner, owner_external()} | {nice, nice_external()} | {cgroup, cgroup_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, [{period, period_seconds()} | {value, number()}] | number() | undefined} | {dest_refresh_start, dest_refresh_delay_milliseconds()} | {dest_refresh_delay, dest_refresh_delay_milliseconds()} | {request_name_lookup, sync | async} | {request_timeout_adjustment, boolean()} | {request_timeout_immediate_max, request_timeout_immediate_max_milliseconds()} | {response_timeout_adjustment, boolean()} | {response_timeout_immediate_max, response_timeout_immediate_max_milliseconds()} | {count_process_dynamic, [{period, period_seconds()} | {rate_request_max, number()} | {rate_request_min, number()} | {count_max, number()} | {count_min, number()}] | false} | {timeout_terminate, undefined | timeout_terminate_milliseconds()} | {restart_delay, [{time_exponential_min, restart_delay_milliseconds()} | {time_exponential_max, restart_delay_milliseconds()} | {time_linear_min, restart_delay_milliseconds()} | {time_linear_slope, restart_delay_milliseconds()} | {time_linear_max, restart_delay_milliseconds()} | {time_absolute, restart_delay_milliseconds()}] | false} | {scope, atom()} | {monkey_latency, [{time_uniform_min, latency_min_time_milliseconds()} | {time_uniform_max, latency_max_time_milliseconds()} | {time_gaussian_mean, latency_mean_time_milliseconds()} | {time_gaussian_stddev, float() | pos_integer()} | {time_absolute, latency_time_milliseconds()}] | system | false} | {monkey_chaos, [{probability_request, float()} | {probability_day, float()}] | system | false} | {automatic_loading, boolean()} | {dispatcher_pid_options, [{priority, low | normal | high} | {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 | mixed}]} | {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()]} | {application_name, undefined | atom()} | {init_pid_options, [{priority, low | normal | high} | {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 | mixed}]} | {request_pid_uses, infinity | pos_integer()} | {request_pid_options, [{priority, low | normal | high} | {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 | mixed}]} | {info_pid_uses, infinity | pos_integer()} | {info_pid_options, [{priority, low | normal | high} | {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 | mixed}]} | {duo_mode, boolean()} | {hibernate, [{period, period_seconds()} | {rate_request_min, number()}] | boolean()} | {reload, boolean()}]

service_proplist()

service_proplist() = [{type, internal | external} | {prefix, cloudi:service_name_pattern()} | {module, atom() | file:filename()} | {file_path, file:filename()} | {args, list()} | {env, [{string(), string()}]} | {dest_refresh, dest_refresh()} | {protocol, default | local | tcp | udp} | {buffer_size, default | pos_integer()} | {timeout_init, timeout_initialize_value_milliseconds()} | {timeout_async, timeout_send_async_value_milliseconds()} | {timeout_sync, timeout_send_sync_value_milliseconds()} | {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, seconds()} | {options, service_options_internal() | service_options_external()}, ...]

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:filename()} | {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_milliseconds()} | {timeout_async, timeout_send_async_milliseconds()} | {timeout_sync, timeout_send_sync_milliseconds()} | {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_milliseconds()} | {timeout_async, timeout_send_async_milliseconds()} | {timeout_sync, timeout_send_sync_milliseconds()} | {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, [{period, period_seconds()} | {value, number()}] | number() | undefined} | {dest_refresh_start, dest_refresh_delay_milliseconds()} | {dest_refresh_delay, dest_refresh_delay_milliseconds()} | {request_name_lookup, sync | async} | {request_timeout_adjustment, boolean()} | {request_timeout_immediate_max, request_timeout_immediate_max_milliseconds()} | {response_timeout_adjustment, boolean()} | {response_timeout_immediate_max, response_timeout_immediate_max_milliseconds()} | {monkey_latency, [{time_uniform_min, latency_min_time_milliseconds()} | {time_uniform_max, latency_max_time_milliseconds()} | {time_gaussian_mean, latency_mean_time_milliseconds()} | {time_gaussian_stddev, float() | pos_integer()} | {time_absolute, latency_time_milliseconds()}] | system | false} | {monkey_chaos, [{probability_request, float()} | {probability_day, float()}] | system | false} | {dispatcher_pid_options, [{priority, low | normal | high} | {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 | mixed}]} | {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()]} | {limit, limit_external()}]

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, [{period, period_seconds()} | {value, number()}] | number() | undefined} | {dest_refresh_start, dest_refresh_delay_milliseconds()} | {dest_refresh_delay, dest_refresh_delay_milliseconds()} | {request_name_lookup, sync | async} | {request_timeout_adjustment, boolean()} | {request_timeout_immediate_max, request_timeout_immediate_max_milliseconds()} | {response_timeout_adjustment, boolean()} | {response_timeout_immediate_max, response_timeout_immediate_max_milliseconds()} | {monkey_latency, [{time_uniform_min, latency_min_time_milliseconds()} | {time_uniform_max, latency_max_time_milliseconds()} | {time_gaussian_mean, latency_mean_time_milliseconds()} | {time_gaussian_stddev, float() | pos_integer()} | {time_absolute, latency_time_milliseconds()}] | system | false} | {monkey_chaos, [{probability_request, float()} | {probability_day, float()}] | system | false} | {dispatcher_pid_options, [{priority, low | normal | high} | {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 | mixed}]} | {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()]} | {init_pid_options, [{priority, low | normal | high} | {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 | mixed}]} | {request_pid_uses, infinity | pos_integer()} | {request_pid_options, [{priority, low | normal | high} | {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 | mixed}]} | {info_pid_uses, infinity | pos_integer()} | {info_pid_options, [{priority, low | normal | high} | {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 | mixed}]} | {hibernate, [{period, period_seconds()} | {rate_request_min, number()}] | boolean()} | {reload, boolean()}]

timeout_initialize_milliseconds()

timeout_initialize_milliseconds() = limit_min | limit_max | timeout_initialize_value_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_value_milliseconds()

timeout_send_async_value_milliseconds() = 499..4294967195

timeout_send_sync_milliseconds()

timeout_send_sync_milliseconds() = limit_min | limit_max | timeout_send_sync_value_milliseconds()

timeout_send_sync_value_milliseconds()

timeout_send_sync_value_milliseconds() = 499..4294967195

timeout_terminate_milliseconds()

timeout_terminate_milliseconds() = limit_min | limit_max | timeout_terminate_value_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.
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_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.

.
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_search/2

Search service instances for matches on the provided service name.

Multiple services may be returned for a single service name.
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}

List all ACL entries.

acl_add/2

acl_add(L::[{atom(), acl()}, ...], Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | 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 | 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:filename(), ...]}

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:filename(), Timeout::api_timeout_milliseconds()) -> ok | {error, bad_directory}

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:filename(), Timeout::api_timeout_milliseconds()) -> ok | {error, does_not_exist | bad_name}

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.

logging/1

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

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(), Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | 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_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(), Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | 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}

List both the connected and disconnected CloudI nodes.

nodes_add/2

nodes_add(L::[node(), ...], Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | 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}

List all the CloudI nodes known to be connected.

nodes_dead/1

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

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}

Get CloudI nodes configuration.

nodes_remove/2

nodes_remove(L::[node(), ...], Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | 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_proplist(), Timeout::api_timeout_milliseconds()) -> ok | {error, timeout | noproc | cloudi_core_i_configuration:error_reason_nodes_set()}

Set CloudI nodes configuration.

service_subscriptions/2

service_subscriptions(ServiceId::binary() | string(), Timeout::api_timeout_milliseconds()) -> {ok, [cloudi_service:service_name_pattern()]} | {error, timeout | noproc | {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}

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 | 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 | {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 | {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_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 | service_name_invalid}

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_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 | {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, Mar 28 2017, 19:21:38.