Skip to content

Commit

Permalink
Merge branch 'master' into update_releases_3_0
Browse files Browse the repository at this point in the history
Signed-off-by: Pat <[email protected]>
  • Loading branch information
patrick-stephens authored Mar 12, 2024
2 parents 49b29e9 + 393fe54 commit b29cea1
Show file tree
Hide file tree
Showing 56 changed files with 4,378 additions and 374 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/call-build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
# E.g. if we build version 1.9.2 we want to tag with 1.9.2 and 1.9.
- name: Determine major version tag
id: determine-major-version
uses: frabert/replace-string-action@v2.4
uses: frabert/replace-string-action@v2.5
with:
pattern: '^(\d+\.\d+).*$'
string: ${{ inputs.version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/call-build-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:

- name: Get dependencies
run: |
Invoke-WebRequest -O winflexbison.zip $env:WINFLEXBISON
Invoke-WebRequest -OutFile winflexbison.zip $env:WINFLEXBISON
Expand-Archive winflexbison.zip -Destination C:\WinFlexBison
Copy-Item -Path C:\WinFlexBison/win_bison.exe C:\WinFlexBison/bison.exe
Copy-Item -Path C:\WinFlexBison/win_flex.exe C:\WinFlexBison/flex.exe
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/call-run-integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ jobs:
bats-version: 1.9.0

- name: Create k8s Kind Cluster
uses: helm/kind-action@v1.8.0
uses: helm/kind-action@v1.9.0
with:
node_image: kindest/node:${{ matrix.k8s-release }}
cluster_name: kind
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/call-test-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ jobs:
ref: ${{ inputs.ref }}

- name: Create k8s Kind Cluster
uses: helm/kind-action@v1.8.0
uses: helm/kind-action@v1.9.0

- name: Set up Helm
uses: azure/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cron-unstable-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: echo "date=$(date '+%Y-%m-%d-%H_%M_%S')" >> $GITHUB_OUTPUT

- name: Debug event output
uses: hmarr/debug-action@v2
uses: hmarr/debug-action@v3

# Now we need to determine which branch to build
- name: Manual run - get branch
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-closed-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# We may need a specific token here with `packages:admin` privileges which is not available to GITHUB_TOKEN
packages: write
steps:
- uses: vlaurin/action-ghcr-prune@v0.5.0
- uses: vlaurin/action-ghcr-prune@v0.6.0
with:
organization: fluent
container: fluent-bit/pr-${{ github.event.number }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-package-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: echo "date=$(date '+%Y-%m-%d-%H_%M_%S')" >> $GITHUB_OUTPUT

- name: Debug event output
uses: hmarr/debug-action@v2
uses: hmarr/debug-action@v3

pr-package-test-build-generate-matrix:
name: PR - packages build matrix
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
INPUT_VERSION: ${{ inputs.version || github.ref_name }}

# String the 'v' prefix for tags.
- uses: frabert/replace-string-action@v2.4
- uses: frabert/replace-string-action@v2.5
id: formatted_version
with:
pattern: '[v]*(.*)$'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/staging-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Release 2.0 - not latest
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: startsWith(inputs.version, '2.0')
with:
body: "https://fluentbit.io/announcements/v${{ inputs.version }}/"
Expand All @@ -795,7 +795,7 @@ jobs:
target_commitish: '2.0'

- name: Release 2.1 - not latest
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: startsWith(inputs.version, '2.1')
with:
body: "https://fluentbit.io/announcements/v${{ inputs.version }}/"
Expand Down Expand Up @@ -940,7 +940,7 @@ jobs:

- name: Raise docs PR
id: cpr
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
commit-message: 'release: update to v${{ inputs.version }}'
signoff: true
Expand Down Expand Up @@ -1010,7 +1010,7 @@ jobs:

- name: Raise FB PR to update version
id: cpr
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
commit-message: 'release: update to ${{ steps.semvers.outputs.patch }}'
signoff: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-dockerhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4

- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ RUN iex ((new-object net.webclient).DownloadString('https://chocolatey.org/insta
WORKDIR /src/build
COPY . /src/

RUN cmake -G "'Visual Studio 16 2019'" -DOPENSSL_ROOT_DIR='C:\Program Files\OpenSSL-Win64' -DCMAKE_BUILD_TYPE=Release ../;`
RUN cmake -G "'Visual Studio 16 2019'" -DOPENSSL_ROOT_DIR='C:\Program Files\OpenSSL-Win64\lib\VC\x64\MT' -DOPENSSL_INCLUDE_DIR='C:\Program Files\OpenSSL-Win64\include' -DCMAKE_BUILD_TYPE=Release ../;`
cmake --build . --config Release;

# Set up config files and binaries in single /fluent-bit hierarchy for easy copy in later stage
Expand Down
1 change: 1 addition & 0 deletions include/fluent-bit/flb_metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <cmetrics/cmt_encode_prometheus_remote_write.h>
#include <cmetrics/cmt_encode_msgpack.h>
#include <cmetrics/cmt_encode_splunk_hec.h>
#include <cmetrics/cmt_encode_cloudwatch_emf.h>

/* Metrics IDs for general purpose (used by core and Plugins */
#define FLB_METRIC_N_RECORDS 0
Expand Down
119 changes: 39 additions & 80 deletions include/fluent-bit/flb_motd.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,89 +21,48 @@
#define FLB_MOTD_H

static unsigned char flb_motd_text[] = {
0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f,
0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x0a, 0x3c, 0x20, 0x46,
0x6c, 0x75, 0x65, 0x6e, 0x74, 0x20, 0x42, 0x69, 0x74, 0x20, 0x76, 0x32,
0x2e, 0x32, 0x2e, 0x32, 0x20, 0x3e, 0x0a, 0x20, 0x2d, 0x2d, 0x2d, 0x2d,
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
0x2d, 0x2d, 0x2d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x5c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x5c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x5c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x5f, 0x5f, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x0a,
0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x2e,
0x5f, 0x5f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x2d, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, 0x5f,
0x5f, 0x5f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x5f, 0x2d, 0x2d, 0x28, 0x20,
0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5c, 0x20, 0x29, 0x58, 0x58, 0x58,
0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5c, 0x76, 0x2e, 0x0a,
0x20, 0x20, 0x5f, 0x5f, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x5f, 0x5f, 0x5f,
0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x2e, 0x5f, 0x5f, 0x20, 0x20, 0x5f,
0x5f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f,
0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x20, 0x20, 0x0a, 0x5c, 0x5f,
0x20, 0x20, 0x20, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x2f, 0x7c, 0x20, 0x20,
0x7c, 0x20, 0x20, 0x5f, 0x5f, 0x20, 0x5f, 0x5f, 0x20, 0x20, 0x20, 0x5f,
0x5f, 0x5f, 0x5f, 0x20, 0x20, 0x20, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x2f,
0x20, 0x20, 0x7c, 0x5f, 0x20, 0x20, 0x5c, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f,
0x5f, 0x20, 0x20, 0x20, 0x5c, 0x5f, 0x5f, 0x7c, 0x2f, 0x20, 0x20, 0x7c,
0x5f, 0x20, 0x20, 0x5f, 0x5f, 0x5f, 0x20, 0x20, 0x5f, 0x5c, 0x5f, 0x5f,
0x5f, 0x5f, 0x5f, 0x20, 0x20, 0x5c, 0x20, 0x0a, 0x20, 0x7c, 0x20, 0x20,
0x20, 0x20, 0x5f, 0x5f, 0x29, 0x20, 0x20, 0x7c, 0x20, 0x20, 0x7c, 0x20,
0x7c, 0x20, 0x20, 0x7c, 0x20, 0x20, 0x5c, 0x5f, 0x2f, 0x20, 0x5f, 0x5f,
0x20, 0x5c, 0x20, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x5c, 0x20, 0x20, 0x20,
0x5f, 0x5f, 0x5c, 0x20, 0x20, 0x7c, 0x20, 0x20, 0x20, 0x20, 0x7c, 0x20,
0x20, 0x5f, 0x2f, 0x20, 0x20, 0x5c, 0x20, 0x20, 0x20, 0x5f, 0x5f, 0x5c,
0x20, 0x5c, 0x20, 0x20, 0x5c, 0x2f, 0x20, 0x2f, 0x20, 0x5f, 0x28, 0x5f,
0x5f, 0x20, 0x20, 0x3c, 0x20, 0x0a, 0x20, 0x7c, 0x20, 0x20, 0x20, 0x20,
0x20, 0x5c, 0x20, 0x20, 0x20, 0x7c, 0x20, 0x20, 0x7c, 0x5f, 0x7c, 0x20,
0x20, 0x7c, 0x20, 0x20, 0x2f, 0x5c, 0x20, 0x20, 0x5f, 0x5f, 0x5f, 0x2f,
0x7c, 0x20, 0x20, 0x20, 0x7c, 0x20, 0x20, 0x5c, 0x20, 0x20, 0x7c, 0x20,
0x20, 0x20, 0x20, 0x7c, 0x20, 0x20, 0x20, 0x20, 0x7c, 0x20, 0x20, 0x20,
0x5c, 0x20, 0x20, 0x7c, 0x7c, 0x20, 0x20, 0x7c, 0x20, 0x20, 0x20, 0x20,
0x5c, 0x20, 0x20, 0x20, 0x2f, 0x20, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x5c, 0x0a, 0x20, 0x5c, 0x5f, 0x5f, 0x5f, 0x20, 0x20, 0x2f,
0x20, 0x20, 0x20, 0x7c, 0x5f, 0x5f, 0x5f, 0x5f, 0x2f, 0x5f, 0x5f, 0x5f,
0x5f, 0x2f, 0x20, 0x20, 0x5c, 0x5f, 0x5f, 0x5f, 0x20, 0x20, 0x3e, 0x5f,
0x5f, 0x5f, 0x7c, 0x20, 0x20, 0x2f, 0x5f, 0x5f, 0x7c, 0x20, 0x20, 0x20,
0x20, 0x7c, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x20, 0x20, 0x2f, 0x5f,
0x5f, 0x7c, 0x7c, 0x5f, 0x5f, 0x7c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5c,
0x5f, 0x2f, 0x20, 0x2f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x20, 0x20,
0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5c, 0x2f, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x2e, 0x2d, 0x58, 0x58, 0x58, 0x28, 0x20, 0x20, 0x20, 0x4f, 0x20,
0x20, 0x20, 0x4f, 0x20, 0x20, 0x29, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x2d, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f,
0x58, 0x58, 0x58, 0x28, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x55,
0x20, 0x20, 0x20, 0x20, 0x20, 0x29, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5c, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x58, 0x58,
0x58, 0x58, 0x58, 0x28, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x29, 0x2d, 0x2d, 0x5f, 0x20, 0x20,
0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5c,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x58,
0x58, 0x58, 0x58, 0x58, 0x2f, 0x20, 0x28, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x4f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x29, 0x20, 0x20, 0x20, 0x58,
0x58, 0x58, 0x58, 0x58, 0x58, 0x20, 0x20, 0x20, 0x5c, 0x58, 0x58, 0x58,
0x58, 0x58, 0x5c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x58, 0x58, 0x58, 0x58, 0x58, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58,
0x58, 0x58, 0x58, 0x58, 0x58, 0x20, 0x20, 0x20, 0x5c, 0x5f, 0x5f, 0x20,
0x5c, 0x58, 0x58, 0x58, 0x58, 0x58, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5f, 0x5f,
0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58,
0x58, 0x58, 0x58, 0x58, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x5c, 0x5f, 0x5f, 0x2d, 0x2d, 0x2d, 0x2d, 0x3e, 0x0a, 0x20,
0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, 0x20, 0x20, 0x58, 0x58, 0x58, 0x5f,
0x5f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x5c, 0x5f, 0x5f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x2f, 0x0a, 0x20, 0x20, 0x20, 0x5c, 0x2d, 0x20, 0x20, 0x2d, 0x2d, 0x5f,
0x5f, 0x2f, 0x20, 0x20, 0x20, 0x5f, 0x5f, 0x5f, 0x2f, 0x5c, 0x20, 0x20,
0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x20, 0x20, 0x5f, 0x5f, 0x5f,
0x2d, 0x2d, 0x2f, 0x3d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5c, 0x2d, 0x5c,
0x20, 0x20, 0x20, 0x20, 0x5f, 0x5f, 0x5f, 0x2f, 0x20, 0x20, 0x20, 0x20,
0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x27, 0x2d, 0x2d, 0x2d,
0x20, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x5c, 0x2d, 0x5c, 0x2f, 0x58, 0x58, 0x58, 0x5c, 0x20,
0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5c, 0x2f, 0x20, 0x20, 0x20, 0x20,
0x20, 0x5c, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5c, 0x2f, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x2f, 0x58, 0x58, 0x58, 0x58, 0x58, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5c, 0x58, 0x58, 0x58,
0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x20, 0x20, 0x20, 0x5c, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x58, 0x58, 0x58, 0x58, 0x58,
0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x5c, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x3e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x2f, 0x58, 0x58, 0x58,
0x58, 0x58, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x5c, 0x58, 0x58, 0x58, 0x58, 0x58, 0x2d, 0x2d,
0x5f, 0x5f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x5f, 0x2d, 0x2d, 0x20, 0x58, 0x58,
0x58, 0x58, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
0x58, 0x58, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x20, 0x20, 0x58, 0x58, 0x58, 0x58, 0x58,
0x58, 0x2d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5c, 0x58, 0x58, 0x58, 0x58,
0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x2f, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x22, 0x56, 0x58, 0x58, 0x58,
0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
0x58, 0x58, 0x58, 0x56, 0x22, 0x22, 0x0a, 0x0a, 0x00,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5c, 0x2f, 0x20, 0x0a,
0x0a, 0x00
};

#endif
Expand Down
14 changes: 13 additions & 1 deletion include/fluent-bit/flb_mp.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ struct flb_mp_map_header {
void *data;
};


/* */
struct flb_mp_accessor_match {
int matched;
Expand All @@ -54,6 +53,13 @@ struct flb_mp_accessor_match {
struct flb_record_accessor *ra;
};

/* wrapper to hold a list of record_accessor contexts */
struct flb_mp_accessor_ra {
int is_active;
struct flb_record_accessor *ra;
struct mk_list _head;
};

/* A context to abstract usage of record accessor when multiple patterns exists */
struct flb_mp_accessor {
int matches_size;
Expand All @@ -75,5 +81,11 @@ void flb_mp_accessor_destroy(struct flb_mp_accessor *mpa);
int flb_mp_accessor_keys_remove(struct flb_mp_accessor *mpa,
msgpack_object *map,
void **out_buf, size_t *out_size);
void flb_mp_accessor_set_active(struct flb_mp_accessor *mpa, int status);
int flb_mp_accessor_set_active_by_pattern(struct flb_mp_accessor *mpa,
const char *pattern, int status);

struct cfl_object *flb_mp_object_to_cfl(msgpack_object *o);
int flb_mp_cfl_to_msgpack(struct cfl_object *obj, char **out_buf, size_t *out_size);

#endif
2 changes: 1 addition & 1 deletion lib/cfl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# C Floppy Version
set(CFL_VERSION_MAJOR 0)
set(CFL_VERSION_MINOR 3)
set(CFL_VERSION_MINOR 4)
set(CFL_VERSION_PATCH 0)
set(CFL_VERSION_STR "${CFL_VERSION_MAJOR}.${CFL_VERSION_MINOR}.${CFL_VERSION_PATCH}")

Expand Down
1 change: 1 addition & 0 deletions lib/cfl/include/cfl/cfl.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <cfl/cfl_kvlist.h>
#include <cfl/cfl_time.h>
#include <cfl/cfl_variant.h>
#include <cfl/cfl_object.h>

int cfl_init();

Expand Down
4 changes: 2 additions & 2 deletions lib/cfl/include/cfl/cfl_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ int cfl_array_append_bool(struct cfl_array *array, int value);
int cfl_array_append_int64(struct cfl_array *array, int64_t value);
int cfl_array_append_uint64(struct cfl_array *array, uint64_t value);
int cfl_array_append_double(struct cfl_array *array, double value);
int cfl_array_append_null(struct cfl_array *array);
int cfl_array_append_array(struct cfl_array *array, struct cfl_array *value);
int cfl_array_append_new_array(struct cfl_array *array, size_t size);
int cfl_array_append_kvlist(struct cfl_array *array, struct
cfl_kvlist *value);
int cfl_array_append_kvlist(struct cfl_array *array, struct cfl_kvlist *value);
int cfl_array_print(FILE *fp, struct cfl_array *array);

#endif
2 changes: 2 additions & 0 deletions lib/cfl/include/cfl/cfl_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@
#define timezone _timezone
#define tzname _tzname
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#define timegm _mkgmtime
#endif /* _MSC_VER */

#endif
#endif

51 changes: 51 additions & 0 deletions lib/cfl/include/cfl/cfl_kvlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,55 @@ int cfl_kvlist_count(struct cfl_kvlist *list);
struct cfl_variant *cfl_kvlist_fetch(struct cfl_kvlist *list, char *key);
int cfl_kvlist_print(FILE *fp, struct cfl_kvlist *list);

int cfl_kvlist_insert_string_s(struct cfl_kvlist *list,
char *key, size_t key_size,
char *value, size_t value_size);

int cfl_kvlist_insert_bytes_s(struct cfl_kvlist *list,
char *key, size_t key_size,
char *value,
size_t value_length);

int cfl_kvlist_insert_reference_s(struct cfl_kvlist *list,
char *key, size_t key_size,
void *value);

int cfl_kvlist_insert_bool_s(struct cfl_kvlist *list,
char *key, size_t key_size, int value);

int cfl_kvlist_insert_int64_s(struct cfl_kvlist *list,
char *key, size_t key_size,
int64_t value);

int cfl_kvlist_insert_uint64_s(struct cfl_kvlist *list,
char *key, size_t key_size,
uint64_t value);

int cfl_kvlist_insert_double_s(struct cfl_kvlist *list,
char *key, size_t key_size,
double value);

int cfl_kvlist_insert_array_s(struct cfl_kvlist *list,
char *key, size_t key_size,
struct cfl_array *value);

int cfl_kvlist_insert_new_array_s(struct cfl_kvlist *list,
char *key, size_t key_size,
size_t size);

int cfl_kvlist_insert_kvlist_s(struct cfl_kvlist *list,
char *key, size_t key_size,
struct cfl_kvlist *value);

int cfl_kvlist_insert_s(struct cfl_kvlist *list,
char *key, size_t key_size,
struct cfl_variant *value);

struct cfl_variant *cfl_kvlist_fetch_s(struct cfl_kvlist *list, char *key, size_t key_size);

int cfl_kvlist_contains(struct cfl_kvlist *kvlist, char *name);
int cfl_kvlist_remove(struct cfl_kvlist *kvlist, char *name);
void cfl_kvpair_destroy(struct cfl_kvpair *pair);


#endif
Loading

0 comments on commit b29cea1

Please sign in to comment.