Documentation
¶
Overview ¶
Package symbols provides prebuilt implementations for all the C symbols required to develop plugins as for the definitions of plugin_types.h.
This package defines low-level constructs for plugin development meant for advanced users that wish to use only a portion of the SDK internals. The sdk/plugins package should normally be used instead for the most general use cases, as it provides more high-level constructs. The symbols package is also used internally, and may be subject to more frequent breaking changes.
The C symbol set is divided in different sub-packages to allow plugin developers to import only the ones they need. Importing one of the sub-packages automatically includes its prebuilt symbols in the plugin. If one of the prebuilt symbols is imported it would not be possible to re-define it in the plugin, as this would lead to a linking failure due to multiple definitions of the same symbol.
Each sub-package has been designed to only implement one or few symbols. Plugin developers can either decide to implement all the symbols of the sub-packages, or to import only a subset of them and decide to implement some of the symbols manually.
The mapping between the prebuilt C exported symbols and their sub-package has been designed by grouping them depending on their use cases. The mapping is designed as follows:
- info: get_type, get_id, get_description, get_contact, get_version, get_required_api_version, get_event_source, get_extract_event_sources
- fields: plugin_get_fields
- lasterr: plugin_get_last_error
- initialize: plugin_init, plugin_destroy
- open: plugin_open, plugin_close
- nextbatch: plugin_next_batch
- extract: plugin_extract_fields
- evtstr: plugin_event_to_string
- progress: plugin_get_progress
There are no horizontal dependencies between the sub-packages, which means that they are independent from one another. Each sub-package only depends on the definitions of the base-level sdk package, and occasionally uses constructs from the ptr and cgo packages. This makes each sub-package composable, and developers can easily mix manually implemented C symbols with the prebuilt ones, as long as the interface requirements are respected.
Directories
¶
Path | Synopsis |
---|---|
This package exports the following C function: - char* plugin_event_to_string(ss_plugin_t *s, const ss_plugin_event *evt)
|
This package exports the following C function: - char* plugin_event_to_string(ss_plugin_t *s, const ss_plugin_event *evt) |
This package exports the following C function: - ss_plugin_rc plugin_extract_fields(ss_plugin_t *s, const ss_plugin_event *evt, uint32_t num_fields, ss_plugin_extract_field *fields)
|
This package exports the following C function: - ss_plugin_rc plugin_extract_fields(ss_plugin_t *s, const ss_plugin_event *evt, uint32_t num_fields, ss_plugin_extract_field *fields) |
This package exports the following C function: - char* plugin_get_fields()
|
This package exports the following C function: - char* plugin_get_fields() |
This package exports a set of C functions that provide general information about the plugin.
|
This package exports a set of C functions that provide general information about the plugin. |
This package exports the following C functions: - ss_plugin_t* plugin_init(char* config, int32_t* rc) - void* plugin_destroy(ss_plugin_t* s)
|
This package exports the following C functions: - ss_plugin_t* plugin_init(char* config, int32_t* rc) - void* plugin_destroy(ss_plugin_t* s) |
This package exports the following C function: - const char* get_init_schema(ss_plugin_schema_type* schema_type)
|
This package exports the following C function: - const char* get_init_schema(ss_plugin_schema_type* schema_type) |
This package exports the following C function: - char* plugin_get_last_error(ss_plugin_t* s)
|
This package exports the following C function: - char* plugin_get_last_error(ss_plugin_t* s) |
This package exports the following C function: - char* plugin_list_open_params()
|
This package exports the following C function: - char* plugin_list_open_params() |
This package exports the following C function: - ss_plugin_rc plugin_next_batch(ss_plugin_t* s, ss_instance_t* h, uint32_t *nevts, ss_plugin_event ***evts)
|
This package exports the following C function: - ss_plugin_rc plugin_next_batch(ss_plugin_t* s, ss_instance_t* h, uint32_t *nevts, ss_plugin_event ***evts) |
This package exports the following C functions: - ss_instance_t* plugin_open(ss_plugin_t* s, char* params, ss_plugin_rc* rc) - void plugin_close(ss_plugin_t* s, ss_instance_t* h)
|
This package exports the following C functions: - ss_instance_t* plugin_open(ss_plugin_t* s, char* params, ss_plugin_rc* rc) - void plugin_close(ss_plugin_t* s, ss_instance_t* h) |
This package exports the following C function: - char* plugin_get_progress(ss_plugin_t* s, ss_instance_t* h, uint32_t* progress_pct)
|
This package exports the following C function: - char* plugin_get_progress(ss_plugin_t* s, ss_instance_t* h, uint32_t* progress_pct) |