Go to the source code of this file.
|
int | as_module_apply_record (as_module *m, as_udf_context *ctx, const char *filename, const char *function, as_rec *r, as_list *args, as_result *res) |
|
int | as_module_apply_stream (as_module *m, as_udf_context *ctx, const char *filename, const char *function, as_stream *istream, as_list *args, as_stream *ostream, as_result *res) |
|
int | as_module_configure (as_module *m, void *c) |
|
int | as_module_destroy (as_module *m) |
|
char * | as_module_err_string (int e) |
|
void * | as_module_source (as_module *m) |
|
int | as_module_update (as_module *m, as_module_event *e) |
|
int | as_module_validate (as_module *m, as_aerospike *as, const char *filename, const char *content, uint32_t size, as_module_error *error) |
|
◆ as_module_event_type
Module events.
as_module_event e; e.type = AS_MODULE_CONFIGURE; e.data.config = my_config;
Enumerator |
---|
AS_MODULE_EVENT_CONFIGURE | |
AS_MODULE_EVENT_FILE_SCAN | |
AS_MODULE_EVENT_FILE_ADD | |
AS_MODULE_EVENT_FILE_REMOVE | |
AS_MODULE_EVENT_CLEAR_CACHE | |
Definition at line 43 of file as_module.h.
◆ as_module_apply_record()
Applies a UDF to a stream with provided arguments.
- Parameters
-
m | Module from which the fqn will be resolved. |
ctx | aerospike udf execution context |
filename | The name of the udf module containing the function to be executed. |
function | The name of the udf function to be executed. |
r | record to apply to the function. |
args | list of arguments for the function represented as vals |
res | pointer to a val that will be populated with the result. |
- Returns
- 0 on success, otherwise 1
◆ as_module_apply_stream()
Applies function to a stream and set of arguments. Pushes the results into an output stream.
Proxies to m->hooks->apply_stream(m, ...)
- Parameters
-
m | Module from which the fqn will be resolved. |
ctx | aerospike udf execution context |
filename | The name of the udf module containing the function to be executed. |
function | The name of the udf function to be executed. |
istream | pointer to a readable stream, that will provides values. |
args | list of arguments for the function represented as vals |
ostream | pointer to a writable stream, that will be populated with results. |
res | pointer to a val that will be populated with the result. |
- Returns
- 0 on success, otherwise 1
◆ as_module_configure()
int as_module_configure |
( |
as_module * | m, |
|
|
void * | c ) |
Module Configurator. This configures and reconfigures the module. This can be called an arbitrary number of times during the lifetime of the server.
Proxies to m->hooks->configure(m, ...)
- Parameters
-
m | the module being configured. |
c | the new configurations. |
- Returns
- 0 on success, otherwise 1
◆ as_module_destroy()
Module Destroyer. This frees up the resources used by the module.
Proxies to m->hooks->destroy(m, ...)
- Parameters
-
m | the module being initialized. |
- Returns
- 0 on success, otherwise 1
◆ as_module_err_string()
char * as_module_err_string |
( |
int | e | ) |
|
Return lua error in string format when error code is passed in
- Parameters
-
◆ as_module_source()
Get the source of the module.
- Parameters
-
m | the module to get the source from. |
◆ as_module_update()
Update a Module.
Proxies to m->hooks->update(m, ...)
- Parameters
-
m | the module being initialized. |
e | the module event. |
- Returns
- 0 on success, otherwise 1
◆ as_module_validate()
int as_module_validate |
( |
as_module * | m, |
|
|
as_aerospike * | as, |
|
|
const char * | filename, |
|
|
const char * | content, |
|
|
uint32_t | size, |
|
|
as_module_error * | error ) |
Validates a UDF provided by a string.
- Parameters
-
m | Module from which the fqn will be resolved. |
as | aerospike object to be used. |
filename | The name of the udf module to be validated. |
content | The content of the udf module to be validated. |
size | The size of the udf module to be validated. |
error | The error string (1024 bytes). Should be preallocated. Will be an empty string if no error occurred. |
- Returns
- 0 on success, otherwise 1 on error.