The extension interface allows modules to register functions with the transformer core which can then be used by other modules. This way common functionality can be shared between modules, and additional features added to the Transformer without needing to alter the Transformer's codebase.
Two modules supplied with the Transformer use the extender interface to expose functionality to other modules:
- pipeline.so This module exposes functionality to generate pipelines and hence process updates as well as functionality to define pipeline accessible methods.
- cluster.so This module exposes functionality to send messages between nodes within a Transformer cluster.
The extension interface is totally flexible in how functionality is exposed between modules, however, we recommend that a function is registered that returns a structure containing function pointers/C++ object to provide protection regarding parameter errors.
void* tf_find_function |
( |
const char * |
name | ) |
|
Lookup an extension function.
- Parameters
-
name | - Function name to lookup |
- Returns
- Cast to void function pointer for the function
- Return values
-
int tf_register_function |
( |
const char * |
name, |
|
|
void * |
function |
|
) |
| |
Register a new function against the extension system.
- Parameters
-
name | - Function name |
function | - Cast to void * function pointer |
- Returns
- 0 - Registered (always)