corpjs-system
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

corpjs-system

Start and stop your components in proper order

Features

Reused features from Electric by Systemic

  • System built on components
  • Dependencies between components
  • Graceful start and stop

Additional and enhanced features beyond Electric by Systemic

  • Dependencies are controlled globaly
  • More descriptive dependencies
    • renaming
    • taking subresources
  • Grouping subsystems

Additional and enhanced features beyond Systemic by corpjs-system

  • Type-based
  • Promise interface instead of callback interface
  • More ergonomic system grouping
  • Opportunity for restarting the whole system from any component
  • Opportunity for stopping the whole system from any component
  • Opportunity for ignorable component errors
  • Graceful stop and optional process exit on abnormal behavior
  • Graceful SIGINT / SIGTERM termination

Events

  • start
    • resources: ResourceDescriptor - all resources of the whole system
  • stop
  • restart
    • resources: ResourceDescriptor - all resources of the whole system after restart
  • componentStart
    • componentName: String
    • resources: ResourceDescriptor - currently available resources
  • componentStartFailed
    • componentName: String
    • error: Error
  • componentStop
    • componentName: String
  • componentStopFailed
    • componentName: String
    • error: Error
  • stopTimeout
    • stopTimeout: Number
  • componentRunFailed
    • componentName: String
    • error: Error
  • uncaughtException
    • error: Error
  • unhandledRejection
    • error: Error
  • terminate
    • signal: String
  • exit
    • code: Number

Dependencies (2)

Dev Dependencies (5)

Package Sidebar

Install

npm i corpjs-system

Weekly Downloads

1

Version

0.1.4

License

Beta access license, see LICENSE.TXT

Last publish

Collaborators

  • molinio