A Concierge service is a module that can only be loaded or unloaded. It does not get called when messages are sent (although it is possible to listen for these using events). A service MUST cleanup after itself, in order to prevent memory leaks.
These functions must be implemented within a service (or optionally within a module) as a part of the exports
object.
- load()
Called when the all the resources for a module are loaded.
- unload()
Called when the module resources should be unloaded and timers should be cancelled.
All properties avalible to a module are also set on a service. See Modules.
Called when the all the resources for a module are loaded. Properties such as config
may not exist until this method is called.
This Context: Service Object Kind: API method
When the module resources should be unloaded and timers should be cancelled - this is usually so your module can be updated or unloaded.
This Context: Service Object Kind: API method