-
Notifications
You must be signed in to change notification settings - Fork 1.9k
alias: handle input, output, filter, and processor plugin aliases #11656
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
cosmo0920
wants to merge
11
commits into
master
Choose a base branch
from
comso0920-handle-plugin-aliases
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.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
65bad62
plugin_alias: Implement a mechanism of plugin aliases
cosmo0920 b93d27d
network: Handle network separator correctly
cosmo0920 876360a
output: Handle plugin aliases
cosmo0920 fed31b7
tests: Add internal tests for handling plugin aliases
cosmo0920 97507b1
output: Unwind instance on the new alias-rewrite on exception
cosmo0920 ca71b41
output: Use plugin alias without FLB_OUTPUT_NET flag
cosmo0920 0bf6915
input: Handle plugin aliases
cosmo0920 3f45f06
filter: Handle plugin aliases
cosmo0920 a712322
processor: Handle plugin aliases
cosmo0920 ba60204
tests: internal: Add a test case for custom alias map
cosmo0920 e235f30
plugin_alias: Fix Windows build
cosmo0920 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ | ||
|
|
||
| /* Fluent Bit | ||
| * ========== | ||
| * Copyright (C) 2015-2026 The Fluent Bit Authors | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #ifndef FLB_PLUGIN_ALIAS_H | ||
| #define FLB_PLUGIN_ALIAS_H | ||
|
|
||
| #include <stddef.h> | ||
|
|
||
| /* | ||
| * Returned by flb_plugin_alias_rewrite() when an alias exists but an internal | ||
| * error prevents generating a rewritten string. | ||
| */ | ||
| #define FLB_PLUGIN_ALIAS_ERR ((char *) -1) | ||
|
|
||
| struct flb_plugin_alias_entry { | ||
| int plugin_type; | ||
| const char *alias_name; | ||
| const char *plugin_name; | ||
| }; | ||
|
|
||
| /* | ||
| * Returns the canonical plugin name for alias_name when a mapping exists, | ||
| * otherwise returns NULL. | ||
| */ | ||
| const char *flb_plugin_alias_get(int plugin_type, const char *alias_name, | ||
| size_t alias_name_length); | ||
|
|
||
| /* | ||
| * Rewrites plugin_reference when it starts with a known alias. | ||
| * | ||
| * Return values: | ||
| * - NULL: no rewrite needed | ||
| * - FLB_PLUGIN_ALIAS_ERR: rewrite needed but failed | ||
| * - allocated string: rewritten plugin reference (caller must free) | ||
| */ | ||
| char *flb_plugin_alias_rewrite(int plugin_type, const char *plugin_reference); | ||
|
|
||
| void flb_plugin_alias_set_custom_entries( | ||
| const struct flb_plugin_alias_entry *entries); | ||
| void flb_plugin_alias_reset_custom_entries(void); | ||
|
|
||
| #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
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
Oops, something went wrong.
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.