@kronos-integration/service-systemd
v5.0.0
Published
kronos systemd integration
Downloads
2,762
Readme
@kronos-integration/service-systemd
kronos systemd integration
- sync node state to systemd with notify (done)
- propagate config into kronos (done)
- propagate socket activations into kronos (partly)
- start / stop / restart / reload initiated from systemd (partly)
- log into journal (done)
usage
API
Table of Contents
JournalLogger
Extends ServiceLogger
Forward logs entries to the journal.
logEntry
Pass to systemd journal.
Parameters
entryObject
FileDescriptor
Type: Object
Properties
credentialsDirectory
Type: string
SystemdConfig
Extends ServiceConfig
Provides config from CONFIGURATION_DIRECTORY. Also injects listeningFileDescriptors into the config
Properties
configurationDirectorystring taken from CONFIGURATION_DIRECTORY
listeningFileDescriptors
listeningFileDescriptors as passed in LISTEN_FDS and LISTEN_FDNAMES.
Returns Array<FileDescriptor>
loadConfig
Load config from configuration dir. Additionally pass listeninfFileDescriptions into config.
ServiceSystemd
Extends ServiceProviderMixin(Service, JournalLogger, SystemdConfig)
Kronos bridge to systemd:
- sync node state to systemd with notify
- propagate config into kronos world
- propagate socket activations into kronos (partly)
- start / stop / restart / reload initiated from systemd
- log into journal
Parameters
config(optional, default{})ic
registerService
When in debug mode; every sevice gets the logLevel of the service provider.
Parameters
serviceService
getCredential
Deliver credential as provided by systemd.
Parameters
Returns Promise<(Uint8Array | string)>
getCredentials
Deliver credentials as provided by systemd.
Parameters
Returns Promise<Array<(Uint8Array | string)>>
endpoints
Definition of the predefined endpoints.
- info in
Returns Object predefined endpoints
install
With npm do:
npm install @kronos-integration/service-systemdlicense
BSD-2-Clause
