fluentlib

command module
v0.0.0-...-5529b57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2024 License: MIT Imports: 3 Imported by: 0

README

fluentdlib

A library for Fluentd's forward protocol and tools for Fluentd / Fluent Bit

Tools

Dump contents of Fluentd Forward messages (Forward, PackedForward, CompressedPackedForward) and Fluent Bit chunk files:

fluentlibtool dump [filepath]...

Run a fake Fluentd server to print logs in JSON to stdout or one file per each tag + key fields

fluentlibtool server -f 0 -x 0 -n 0.5
fluentlibtool server --split_output_keys=environment/class,level --split_output_path=/tmp/%s.json --split_strict_mode=true

(-f, -x, and -n are to simulate network errors etc, use fluentlibtool help server to get help)

Library

  • protocol/fluentbitchunk can decode Fluent Bit's internal chunk (buffer) files.
  • protocol/forwardprotocol provides definitions of Fluentd Forward Protocol v1 in Go, as well as utility functions for handshaking and decoding.
  • server provides a fake Fluentd server that can be used for testing

The library part is intended for verification and functions here are NOT optimized for performance.

See server/server_test.go:TestServerBasic for basic examples of a client

Build

  1. Install go
  2. Install https://github.com/relex/gotils
make
make test

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package cmd provides list of commands for tools
Package cmd provides list of commands for tools
Package dump provides functions to dump messages and logs in various formats
Package dump provides functions to dump messages and logs in various formats
Package protocol is the parent of protocol definition packeges
Package protocol is the parent of protocol definition packeges
fluentbitchunk
Package fluentbitchunk provides parsing and creation of fluent-bit chunk files
Package fluentbitchunk provides parsing and creation of fluent-bit chunk files
forwardprotocol
Package forwardprotocol provides definitions and a reference implementation for Fluentd "Forward" protocol
Package forwardprotocol provides definitions and a reference implementation for Fluentd "Forward" protocol
Package server provides a simple test server for Fluentd "Forward" protocol, which dumps every records received in JSON format
Package server provides a simple test server for Fluentd "Forward" protocol, which dumps every records received in JSON format
receivers
Package receivers contains the interface and implementations to receive results from fake server
Package receivers contains the interface and implementations to receive results from fake server
Package util provides utility functions
Package util provides utility functions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL