Shared
These functions are only available in the import method!
require
Function to return value from a json or lua (but triggered as lua code) files
Parameters description
path
- the file's path (format example:'@HRTest/config.lua'
or'@HRTest/settings.json'
)
Return description
result
- contains the result of the file (if lua, returns what the executed file as code returns, otherwise the file should be as a value like table or string or etc.)
OnStart
Function to register a callback function into the event onResourceStart's handler with option to filter the resource that starts and triggers the cb function when the resource is started
Parameters description
resName
- the resource name, if'any'
it won't filtercb
- the callback function which parameters provide the resource name (it's useful if you use'any'
as your resName option)
OnStop
Function to register a callback function into the event onResourceStop's handler with option to filter the resource that stops and triggers the cb function when the resource stops
Parameters description
resName
- the resource name, if'any'
it won't filtercb
- the callback function which parameters provide the resource name (it's useful if you use'any'
as your resName option)
OnStarting
Function to register a callback function into the event onResourceStarting's handler with option to filter the resource that is starting and triggers the cb function when the command to start the resource is entered (it means this is triggered while the resource is starting)
Parameters description
resName
- the resource name, if'any'
it won't filtercb
- the callback function which parameters provide the resource name (it's useful if you use'any'
as your resName option)
Last updated