NodeMessaging
Extends:
Direct Subclass:
Node messaging base class.
Constructor Summary
Public Constructor | ||
public |
constructor(arg_name: string, arg_settings: object, arg_log_context: string): nothing Create a Node messaging instance. |
Member Summary
Public Members | ||
public |
Is master flag. |
|
public |
Class type flag. |
|
public |
Master name. |
|
public |
state: * |
Method Summary
Public Methods | ||
public |
find_master(): Node Find master node. |
|
public |
get_logs_bus(): BusClient | BusServer Get metrics bus client or server instance. |
|
public |
get_metrics_bus(): BusClient | BusServer Get metrics bus client or server instance. |
|
public |
get_msg_bus(): BusClient | BusServer Get metrics bus client or server instance. |
|
public |
Promote this node to master node. |
|
public |
register_to_master(): nothing Register this node to master node. |
|
public |
Revoke this node from master node. |
|
public |
send_msg_to_master(arg_payload: object): nothing Send a message to master node through a bus. |
|
public |
switch_state(arg_state: string): nothing Switch Node state. |
|
public |
unregister_to_master(): nothing Unegister this node from master node. |
Public Constructors
Public Members
public state: * source
Public Methods
public get_logs_bus(): BusClient | BusServer source
Get metrics bus client or server instance.
Return:
BusClient | BusServer | Metrics bus client or server. |
public get_metrics_bus(): BusClient | BusServer source
Get metrics bus client or server instance.
Return:
BusClient | BusServer | Metrics bus client or server. |
public get_msg_bus(): BusClient | BusServer source
Get metrics bus client or server instance.
Return:
BusClient | BusServer | Metrics bus client or server. |
public send_msg_to_master(arg_payload: object): nothing source
Send a message to master node through a bus.
Params:
Name | Type | Attribute | Description |
arg_payload | object | content of the message to send. |
Return:
nothing |
public switch_state(arg_state: string): nothing source
Switch Node state.
Params:
Name | Type | Attribute | Description |
arg_state | string | target state. |
Return:
nothing |
public unregister_to_master(): nothing source
Unegister this node from master node. (TODO)
Return:
nothing |