Lifecycle

Introduced in 4.0.0

Stability: 2 - Stable

const Lifecycle = require('kado/lib/Lifecycle')

The Lifecycle library provides an interface for registering call back methods for starting and stopping systems.

Class: Lifecycle extends EventEmitter

Lifecycle.constructor()

Lifecycle.nextIndex()

Lifecycle.list()

Lifecycle.get(title)

Lifecycle.add(title, start, stop)

Lifecycle.remove(title)

Lifecycle.execute(keys, method)

Lifecycle.start()

Note: each item will emit a start event.

Lifecycle.stop()

Note: each item will emit a stop event.