You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MINIFICPP-2850 Finalize stable API before 1.0 (#2205)
This commit finalizes the “stable” MiNiFi C/C++ extension API surface in preparation for a 1.0 release by renaming and normalizing exported C symbols/headers, updating the C++ extension framework wrappers, and migrating extensions/tests to the new API (including new metrics reporting and trigger-when-empty control paths).
* removed MINIFI_NULL
* removed struct typedefs
* snake_case type and function names
* removed stdbool.h, in C23, bool, true, and false are keywords
* PropertyDefinition: type -> allowed_type
* getTriggerWhenEmpty member -> setTriggerWhenEmpty free function, to be called from onSchedule
* onTrigger -> trigger, onSchedule -> schedule, onUnSchedule -> unschedule
* calculate_metrics -> call report_metrics on process_context instead of callback
* processor_class_definition: removed class_ prefixes from members
* minifi-c.h -> minifi-api.h
* removed get/setTriggerWhenEmpty from ProcessorApi
* moved MinifiLoggerSetMaxLogSize, MinifiLoggerLevel to AdvancedLogger
* moved AdvancedLogger.h to minifi-api/include/minifi-cpp/core/logging/AdvancedLogger.h
* minifi_processor_class_definition -> minifi_processor_definition
* minifi_controller_service_class_definition -> minifi_controller_service_definition
* removed <= c23 workarounds
* removed unused macro magic
Copy file name to clipboardExpand all lines: Extensions.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,36 +20,36 @@ To enable all extensions for your platform, you may use -DENABLE_ALL=TRUE OR sel
20
20
Extensions are dynamic libraries loaded at runtime by the agent.
21
21
22
22
## C extensions
23
-
You can build shared libraries using the API defined in `minifi-c.h`
24
-
For the shared library to be considered a valid extension, it must export a global symbol with the name `MinifiApiVersion`
25
-
with its value equal to the uint32_t constant `MINIFI_API_VERSION` from `minifi-c.h`.
23
+
You can build shared libraries using the API defined in `minifi-api.h`
24
+
For the shared library to be considered a valid extension, it must export a global symbol with the name `minifi_api_version`
25
+
with its value equal to the uint32_t constant `MINIFI_API_VERSION` from `minifi-api.h`.
26
26
27
27
### Resource Lifetime
28
28
29
-
Unless otherwise specified, the following lifetime rules apply to all functions called by the agent (e.g., `MinifiInitExtension`, `MinifiProcessorCallbacks::onTrigger`, or other callbacks):
29
+
Unless otherwise specified, the following lifetime rules apply to all functions called by the agent (e.g., `minifi_init_extension`, `minifi_processor_callbacks::trigger`, or other callbacks):
30
30
31
31
* Arguments: The lifetime of any resource provided as a function argument is limited to the duration of that function call.
32
32
33
-
* Created Resources: The lifetime of resources created within these functions (e.g., a handle returned by `MinifiProcessSessionGet` inside `MinifiProcessorCallbacks::onTrigger`)
33
+
* Created Resources: The lifetime of resources created within these functions (e.g., a handle returned by `minifi_process_session_get` inside `minifi_processor_callbacks::trigger`)
34
34
is limited to the scope of the innermost callback.
35
-
(the return value of `MinifiRegisterExtension` is only valid during the execution of `MinifiInitExtension`).
35
+
(the return value of `minifi_register_extension` is only valid during the execution of `minifi_init_extension`).
36
36
37
-
Because of these scoping rules, all processor and controller service registrations must occur within the `MinifiInitExtension` call.
37
+
Because of these scoping rules, all processor and controller service registrations must occur within the `minifi_init_extension` call.
0 commit comments