Microservice (mservice)
Description
Descriptor of a console microservice that is started and kept running.
Started by one or several nodes. On failure it is restarted automatically, but cyclic restarts are excluded (5 times in 10 seconds). If exceeded, the system forcibly disables the account.
Runs as a command line that can contain macros for substituting the domain, URLs of system web servers on the current site, and the path to the log folder.
The command runs in the working directory where the attached zip archive (attachment) is first and mandatorily unpacked. The archive can contain a script, application, or other files. The archive is mandatory.
Fields
{
"id": uuid,
"name": str,
"cmdline": str,
"cmdparam": str,
"enabled": bool,
"attachment": file,
"opts": {
"title": str,
"comment": str,
"mode": str,
"site_mode": str,
"selected_sites": array<str>,
"restart_mode": str,
"heartbeat_timeout": str,
"attachment_info": object
},
"ext": {
"ct": date,
"lwt": date
}
}
| Specification | Description |
|---|---|
Field: |
Identifier. Can be specified at creation, otherwise generated by the system. |
Field: |
Name |
Executable command.
|
|
Field: |
Parameters added to the executable command. Macro values are generated automatically based on the active configuration, the current microservice instance, the current domain, and possibly the master domain option https_host. |
Field: |
Activity switch. |
Field: |
Property for uploading the archive with the working directory contents. Mainly contains an executable script or program. |
Field: |
|
Field: |
Arbitrary title |
Field: |
Arbitrary comment |
Field: |
Operating mode within the site:
|
Section of msvc role instances where this uploaded microservice may run. For each msvc instance, several sections can be specified in the configuration, or none at all. If the configuration has no msvc instances on the current site serving the specified section, all msvc instances of the current site are allowed to serve the entity (this behavior differs from class.opts.section). |
|
Field: |
Leader selection mode among msvc instances allowed to execute this microservice taking the specified section into account. Selection is performed by sorting on a key:
|
Field: |
Operating mode between sites:
|
Field: |
List of sites for site_mode='selected'. |
Field: |
Restart mode:
|
Field: |
Interval for sending the msvc role instance activity notification (500 - 60000 ms). |
Field: |
Information about the uploaded attachment, available for reading. The attachment itself is uploaded via the /attachment path in the REST API. |
Field: |
Allows extending the compound with arbitrary keys and values |
Field: |
Object creation time |
Field: |
Time of last modification of the object |