This module is a template to create a dummy econfd daemon.
The service must be launched by external caller (see pad_service_econfd_mgr
).
To add a new CloudI service, see cloudi_service_api:services_add/2
.
The callback pad_service_econfd_daemon:cloudi_service_init/4
function receives Args
(binary string) as defined by the JSON:
{
"subscriptions": [
"get_state/get"
],
"ip": "172.26.0.3",
"port": 4565,
"name": "econfd_daemon_default",
"callpoint": "default_cp",
"callback_module": "pad_service_econfd_daemon",
"args": []
}
These are default values in case of Args
be empty.
subscriptions: a list of paths
ip: ConfD ip address
port: ConfD port
name: econfd daemon name, it is also used to compose the service prefix
callpoint: callpoint name used in the yang model to invoke confd callbacks
callback_module: erlang module where confd callbacks are defined
args: optional arguments (i.e. set daemon for many callpoints and callbacks)
The service prefix
composed by pad_service_econfd_mgr
is given by
"/econfd/daemons/<name>/"
$ rebar3 compile