Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.19 KB

Service.md

File metadata and controls

31 lines (23 loc) · 1.19 KB

Service

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.

Functions

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.

Properties

All properties avalible to a module are also set on a service. See Modules.


load()

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

unload()

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