Skip to main content

Interface: IComponent

Interface describing a component which can be bootstrapped, started and stopped.

Methods

className()

className(): string

Returns the class name of the component.

Returns

string

The class name of the component.


bootstrap()?

optional bootstrap(nodeLoggingComponentType?): Promise<boolean>

Bootstrap the component by creating and initializing any resources it needs.

Parameters

nodeLoggingComponentType?

string

The node logging component type.

Returns

Promise<boolean>

True if the bootstrapping process was successful.


start()?

optional start(nodeLoggingComponentType?): Promise<void>

The component needs to be started when the node is initialized.

Parameters

nodeLoggingComponentType?

string

The node logging component type.

Returns

Promise<void>

Nothing.


stop()?

optional stop(nodeLoggingComponentType?): Promise<void>

The component needs to be stopped when the node is closed.

Parameters

nodeLoggingComponentType?

string

The node logging component type.

Returns

Promise<void>

Nothing.