-
Notifications
You must be signed in to change notification settings - Fork 7
JsonStructureConf v1
This document is draft under construction
This message category is used to configure deamon components.
The messages of this category are generally called JsonConfigMessage and can be referred as:
- JsonConfigRequest if sent from a sender to the daemon.
- JsonConfigResponse if sent from the daemon to the sender as the direct reply to the JsonConfigRequest.
The parameters described in this chapter are common and used in more message types. The parameters special for a particular message type are described in following chapters.
-
"ctype": "<STRING>"
defines the category. It has to beconf
. -
"type": "<STRING>"
is a type of the JsonConfigMessage and it is the key identification of an expected structure of the rest of the message. If received as a JsonConfigRequest the daemon passes the message to a parser component configured for the receiving channel to get the JsonConfigRequest to be processed by the daemon. If sent from the daemon as a JsonConfigResponse it plays the same role for the addressee of the message.
We have only one type referring as cfg_admin
at present.
-
"msgid": "<STRING>"
is the message identification unique for a sender. If used in JsonSchedulerMessage, it is repated in the counterpart. Then it can be used by the sender to match outgoing and incoming messages. -
"cfgid": "<STRING>"
is the identification of the component to be configured. -
"properties": "<JSON>"
each daemon component in the configuration has properties to be configured. -
"status": "<STRING>"
is a string with textual form of response code returned by a JsonSchedulerResponse. Possible values are described in dedicated chapter.
The response code is passed by "rcode": <WORD>
as a number or by "status": <STRING>
in the textual representation. The textual form comes from DPA.h declarations with some
additions:
NUMBER | STRING | Comment |
---|---|---|
0 | STATUS_NO_ERROR | |
TODO |
We have not yet designed which component`s properties are to be configuerd in runtime. There are also security measures to be considered.
Input from real world deployment very much appreciated!
Runtime configuration of the main TracerFile.json as for illustration just now.
JsonConfigRequest:
{
"ctype": "conf",
"type": "cfg-admin",
"msgid": "<STRING>",
"cfgid": "config_tracer_file",
"properties":{
"[trace_file_name]": "<STRING>",
"[trace_file_size]": "<INT>",
"[verbosity_level]": "<STRING>"
}
}
JsonConfigResponse:
{
"ctype": "conf",
"type": "cfg-admin",
"msgid": "<STRING>",
"cfgid": "config_tracer_file",
"properties":{
"[trace_file_name]": "<STRING>",
"[trace_file_size]": "<INT>",
"[verbosity_level]": "<STRING>"
},
"status": "<STRING>"
}
There is a mode in which gateway operates.
JsonConfigRequest:
{
"ctype": "conf",
"type": "mode",
"msgid": "<STRING>",
"cmd": "<STRING>"
}
JsonConfigResponse:
{
"ctype": "conf",
"type": "mode",
"msgid": "<STRING>",
"cmd": "<STRING>",
"status": "<STRING>"
}