-
Notifications
You must be signed in to change notification settings - Fork 5
Integration
Register an error handler for a specific module.
Args:
-
moduleName- the module name (string) -
handler- error handler function (function)
Handle an error from a module with recovery attempt.
Args:
-
moduleName- the module where error occurred (string) -
error- the error message or object (any) -
context- additional context information (table)
Returns:
-
recovered- whether error was recovered (boolean)
Attempt generic error recovery.
Args:
-
moduleName- the module name (string) -
error- the error (any) -
context- error context (table)
Returns:
-
recovered- whether recovery succeeded (boolean)
Get the error log.
Returns:
-
errorLog- array of error entries (table)
Clear the error log.
Register an event handler for a module.
Args:
-
event- the event name (string) -
moduleName- the module name (string) -
handler- event handler function (function)
Unregister an event handler.
Args:
-
event- the event name (string) -
moduleName- the module name (string)
Dispatch an event to all registered handlers.
Args:
-
event- the event name (string) -
...- event arguments (any)
Returns:
-
handled- number of handlers that processed the event (number) -
failed- number of handlers that failed (number)
Start tracking performance for an operation.
Args:
-
operation- the operation name (string)
Returns:
-
trackingId- tracking identifier (number)
End performance tracking for an operation.
Args:
-
trackingId- the tracking identifier (number)
Returns:
-
duration- operation duration in milliseconds (number)
Get all performance metrics.
Returns:
-
metrics- table of performance metrics (table)
Optimize memory usage by cleaning up unused resources.
Returns:
-
freed- estimated memory freed in KB (number)
Register a module with the integration system.
Args:
-
moduleName- the module name (string) -
module- the module table (table)
Get a registered module.
Args:
-
moduleName- the module name (string)
Returns:
-
module- the module table or nil (table|nil)
Initialize all registered modules in proper order.
Returns:
-
initialized- number of modules initialized (number) -
failed- number of modules that failed (number)
Wire all modules together with proper event handling.
Returns:
-
success- whether wiring succeeded (boolean)
Initialize the integration system.
Returns:
-
success- whether initialization succeeded (boolean)
Get integration system status.
Returns:
-
status- status information table (table)