dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
dfx_registration_api_t Struct Reference

Transient registration context used during plugin discovery. More...

#include <dfx-plugins-interface/PluginInterface.h>

Public Attributes

dfx_registration_handle_t handle
 Internal host context. Must be passed as the first argument to registration functions.
int(* register_transport )(dfx_registration_handle_t handle, char const *scheme, dfx_transport_interface_t const *transport_interface, size_t transport_interface_size)
 Registers a transport scheme with the host.
int(* register_node )(dfx_registration_handle_t handle, char const *type, char const *node_metadata, char const *config_schema, dfx_node_interface_t const *node_interface, size_t node_interface_size)
 Registers a node type with the host.

Detailed Description

Transient registration context used during plugin discovery.

This structure is provided to the plugin during the dfx_init_plugin call. It serves as the primary mechanism for a plugin to announce its capabilities (Transports, Nodes) to the host.

Note
This structure and its internal context are only valid for the duration of the dfx_init_plugin execution. Plugins must not store this pointer for later use.

Member Data Documentation

◆ handle

dfx_registration_handle_t dfx_registration_api_t::handle

Internal host context. Must be passed as the first argument to registration functions.

◆ register_node

int(* dfx_registration_api_t::register_node) (dfx_registration_handle_t handle, char const *type, char const *node_metadata, char const *config_schema, dfx_node_interface_t const *node_interface, size_t node_interface_size)

Registers a node type with the host.

Parameters
[in]handleThe registration handle provided in this struct.
[in]typeThe node type to register.
[in]node_metadataThe JSON metadata of the node type.
[in]config_schemaA JSON schema for the node configuration. Can be null.
[in]node_interfacePointer to the node's interface vtable.
[in]node_interface_sizeSize of the dfx_node_interface_t structure.
Returns
DFX_OK on success, DFX_ERROR on error.
Errors
On failure, errno is set to:
  • EINVAL: handle is NULL.
  • ENOTSUP: node_interface definition is too old.

◆ register_transport

int(* dfx_registration_api_t::register_transport) (dfx_registration_handle_t handle, char const *scheme, dfx_transport_interface_t const *transport_interface, size_t transport_interface_size)

Registers a transport scheme with the host.

The plugin calls this to associate a URI scheme (e.g., "udp", "shm") with its implementation vtable.

Parameters
[in]handleThe registration handle provided in this struct.
[in]schemeThe URI scheme string.
[in]transport_interfacePointer to the transport's interface vtable.
[in]transport_interface_sizeSize of the dfx_transport_interface_t structure.
Returns
DFX_OK on success, DFX_ERROR on error.
Errors
On failure, errno is set to:
  • EINVAL: handle is NULL.
  • ENOTSUP: transport_interface definition is too old.

The documentation for this struct was generated from the following file: