-
Notifications
You must be signed in to change notification settings - Fork 1.9k
plugins: add ZeroBus output plugin #11678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mats16
wants to merge
8
commits into
fluent:master
Choose a base branch
from
mats16:feat/out-zerobus
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+818
−0
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
876b640
build: add ZeroBus output plugin build configuration
mats16 01b1555
out_zerobus: add ZeroBus output plugin implementation
mats16 7b39bec
build: update Windows architecture check for ZeroBus FFI
mats16 d63358a
build: add ZeroBus output plugin build configuration (#1)
mats16 c5e1f3b
build: refine ZeroBus output plugin configuration
mats16 c2f3677
build: make ZeroBus output plugin opt-in
mats16 5c37c02
build: standardize Zerobus naming
mats16 8b7012b
out_zerobus: standardize Zerobus naming
mats16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Locate the pre-installed Zerobus FFI static library. | ||
| # | ||
| # The out_zerobus plugin requires the Zerobus FFI library to be installed | ||
| # on the build system before configuring. Fluent Bit does not download | ||
| # third-party dependencies at configure/build time. | ||
| # | ||
| # If the plugin is enabled and the library is not found, configuration fails. | ||
| # | ||
| # Use -DZEROBUS_LIB_DIR=/path/to/dir to point to a custom location. | ||
| # | ||
| # After this module runs successfully: | ||
| # ZEROBUS_LIB_FILE — full path to the static library | ||
|
|
||
| set(_ZEROBUS_LIB_NAME "zerobus_ffi") | ||
|
|
||
| if(ZEROBUS_LIB_DIR) | ||
| # User provided an explicit directory — search only there. | ||
| find_library(ZEROBUS_LIB_FILE | ||
| NAMES ${_ZEROBUS_LIB_NAME} | ||
| PATHS "${ZEROBUS_LIB_DIR}" | ||
| NO_DEFAULT_PATH | ||
| NO_CMAKE_FIND_ROOT_PATH | ||
| ) | ||
| else() | ||
| # Search standard system paths. | ||
| find_library(ZEROBUS_LIB_FILE NAMES ${_ZEROBUS_LIB_NAME}) | ||
| endif() | ||
|
|
||
| if(ZEROBUS_LIB_FILE) | ||
| message(STATUS "Zerobus FFI library: ${ZEROBUS_LIB_FILE}") | ||
| else() | ||
| message(FATAL_ERROR | ||
| "Zerobus FFI library not found. Install libzerobus_ffi or set " | ||
| "-DZEROBUS_LIB_DIR=/path/to/lib, or disable the plugin with " | ||
| "-DFLB_OUT_ZEROBUS=OFF.") | ||
| endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| set(src | ||
| zerobus.c) | ||
|
|
||
| FLB_PLUGIN(out_zerobus "${src}" "") | ||
| target_link_libraries(flb-plugin-out_zerobus "${ZEROBUS_LIB_FILE}") | ||
|
|
||
| # Platform-specific linker flags required by the Rust FFI static library | ||
| if(WIN32) | ||
| target_link_libraries(flb-plugin-out_zerobus | ||
| ws2_32 ntdll userenv advapi32 bcrypt) | ||
| elseif(APPLE) | ||
| target_link_libraries(flb-plugin-out_zerobus | ||
| "-framework CoreFoundation" | ||
| "-framework Security" | ||
| -liconv) | ||
| elseif(UNIX) | ||
| target_link_libraries(flb-plugin-out_zerobus | ||
| -ldl -lpthread -lm -lresolv -lgcc_s) | ||
| endif() | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.