Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@kronos-integration/service
Advanced tools
Base service implementation
key of the service description
Extends EndpointsMixin(StateTransitionMixin(LogLevelMixin(events), prepareActions({ start: { stopped: { target: 'running', during: 'starting', rejected: 'failed', timeout: 5000 } }, restart: { stopped: { target: 'running', during: 'starting', rejected: 'failed', timeout: 5000 }, running: { target: 'running', during: 'restarting', timeout: 5000 } }, stop: { running: { target: 'stopped', during: 'stopping', rejected: 'failed', timeout: 5000 }, starting: { target: 'stopped', during: 'stopping', rejected: 'failed', timeout: 5000 }, failed: { target: 'stopped', during: 'stopping', rejected: 'failed', timeout: 1000 } } }), 'stopped'))
Service The initial state is 'stopped' All services have at least three endpoints:
Called when the service state changes. Emits a serviceStateChanged event to the owner
Called when state transition is not allowed
action
string originating action name
Throws any always
Deliver transtion timeout
transition
ObjectReturns number milliseconds before throwing for a logn running transition
Restart action default implementation does a _stop() and a _start()
Returns Promise fulfills after start
Restarts if in running mode Otherwise does nothing
Returns Promise resolves when restart is done (or immediate if no restart triggered)
Returns the string representation of this step
Returns string human readable name
Deliver json representation
options
Object (optional, default {}
)
Returns Object json representation
defaults to the type
Returns string type
Should we start when beeing registered
Returns boolean false
Takes attribute values from config parameters and copies them over to the object. Copying is done according to configurationAttributes Which means we loop over all configuration attributes and then for each attribute decide if we use the default, call a setter function or simply assign the attribute value
config
ObjectReturns Set of modified attributes
Use new configuration. Internally calls _configure(config) as the constructor does If attribute with needsRestart are touched the restartIfRunning method will be called
config
ObjectReturns Promise fillfills when config is applied
Adds service name to the log event
Returns string separator between service name and endpoint name *
Meta information for the config attributes.
Returns Object
Definition of the predefined endpoints
Returns Object predefined endpoints
Extends Service
Log receiving service
config
owner
We always start immediate
Returns boolean true
Returns string 'logger'
Adds a log input endpoint to the set of Service endpoints
Returns Object predefined endpoints
Extends Service
Config providing service Dispatches config requests to services or preserves them until a maching service becomes avaliable
config
owner
We always start immediate
Returns boolean true
Returns string 'config'
assign services based on a configuration
target
Object objectconfig
Object service defintionprovider
Object service providerwaitUntilFactoryPresent
booleanProvide services and hold service configuration. By default a service provider has two build in services 'logger' and 'config'.
superclass
serviceLoggerClass
(optional, default ServiceLogger
)serviceConfigClass
(optional, default ServiceConfig
)Register & provide Interceptors.
superclass
Endpoint accessor mixin Manages endpoints in a container
superclass
Class class to be extendedReturns Class extended class
default set of endpoints to create
Returns Object {} empty set
With npm do:
npm install kronos-service
BSD-2-Clause
FAQs
Base service implementation
The npm package @kronos-integration/service receives a total of 968 weekly downloads. As such, @kronos-integration/service popularity was classified as not popular.
We found that @kronos-integration/service demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.