Module events

Events are callbacks defined by the user of Servicekit.

These do the actual work of the service. All recieve no arguments and are not expected to return values.

Functions

_events.start () Called once the service has detached and is ready to run.
_events.run () Called to enter the service's main loop.
_events.reload () Called to gracefully reload configuration.
_events.beginstop () Called BEFORE a service begins it's shutdown.
_events.stop () Called after the main loop has exited.


Functions

_events.start ()
Called once the service has detached and is ready to run. Optional. If not present, it is silently ignored.
_events.run ()
Called to enter the service's main loop. Manditory. Service will automatically shut down if not present.
_events.reload ()
Called to gracefully reload configuration. Optional. If not given, reload requests will be silently ignored. On Posix systems, this is fired when the daemon recieves a SIGHUP.
_events.beginstop ()
Called BEFORE a service begins it's shutdown. Don't cleanup here, just trigger the main loop to exit. You MUST define this event, and it MUST not call os.exit(). Otherwise, ServiceKit will not know how to gracefully shutdown your main event loop! On Posix systems, this is fired when the daemon recieves SIGTERM or SIGINT.
_events.stop ()
Called after the main loop has exited. Optional. If not present, it is silently ignored.
generated by LDoc 1.2