output: Updated plugin headers and output.go to reflect proposed change in fluent-bit #124
+46
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to changes proposed in PR #11011 in fluent-bit.
This PR adds a new function FLBPluginRegisterWithEventType that enables setting the event type for output plugins. This change updates the header files to match the proposed changes in the fluent-bit repository, and adds documentation in addition to this new feature. (Reflecting changes proposed in fluent-bit-go: PR 80
The proposed changes in go:
Adding
event_typeto theflb_plugin_proxy_defstruct. This allows for the setting ofevent_typeto a value other than the default log only initialization.In the
flb_plugin_proxy_registerfunction default behavior is enforced by checking for unsetevent_typevalues. When unset (a value of 0) then log behavior is defaulted. No need for incorrect value checking since this was not a set field in the past. Unset fields are set as current behavior dictates and future use cases using incorrect values can be treated as user error.Input use case does not use event-type and is unaffected by this change. (Only a struct change but no change to logic or behavior)