Kind: global class
Extends: EventEmitter
- ABServiceController ⇐
EventEmitter
- new ABServiceController([key])
- .exit() ⇒
Promise
- .init() ⇒
Promise
- .afterShutdown(fn)
- .afterStartup(fn)
- .beforeShutdown(fn)
- .beforeStartup(fn)
- .ready()
- .requestObj(option) ⇒
ABRequestService
- .shutdown()
- .startup()
- ._waitForConfig() ⇒
Promise
- ._waitForDB() ⇒
Promise
- ._waitForRedis() ⇒
Promise
Param | Type | Default | Description |
---|---|---|---|
[key] | string |
"ABServiceController" |
key to identify the contoller |
exit this service.
Kind: instance method of ABServiceController
begin this service.
Kind: instance method of ABServiceController
Kind: instance method of ABServiceController
Param | Type |
---|---|
fn | function |
Kind: instance method of ABServiceController
Param | Type |
---|---|
fn | function |
Kind: instance method of ABServiceController
Param | Type |
---|---|
fn | function |
Kind: instance method of ABServiceController
Param | Type |
---|---|
fn | function |
Send a 'ready' signal on this process. Useful for service managers (like pm2) to know the process is ready.
Kind: instance method of ABServiceController
controller.requestObj(option) ⇒ ABRequestService
return a new ABRequest() object.
Kind: instance method of ABServiceController
Param | Type | Description |
---|---|---|
option | object |
any initial settings for the ABRequestService obj |
the process a service should perform to gracefully shutdown.
Kind: instance method of ABServiceController
the process a service should perform to startup.
Kind: instance method of ABServiceController
waits until the config service has posted a '.config_ready' file
Kind: instance method of ABServiceController
attempts to connect to our maria DB service before continuing.
Kind: instance method of ABServiceController
attempts to connect to our redis server and then resolves() once the connection is ready.
Kind: instance method of ABServiceController