Documentation
¶
Overview ¶
Package plugin implements the global context and objects required to run an instance of a plugin also, the interfaces for input and output plugins.
Index ¶
- func FLBPluginExit() int
- func FLBPluginFlush(data unsafe.Pointer, clength C.int, ctag *C.char) int
- func FLBPluginInit(ptr unsafe.Pointer) int
- func FLBPluginInputCallback(data *unsafe.Pointer, csize *C.size_t) int
- func FLBPluginInputCleanupCallback(data unsafe.Pointer) int
- func FLBPluginRegister(def unsafe.Pointer) int
- func RegisterInput(name, desc string, in InputPlugin)
- func RegisterOutput(name, desc string, out OutputPlugin)
- type ConfigLoader
- type Fluentbit
- type InputPlugin
- type Logger
- type Message
- type Metrics
- type OutputPlugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FLBPluginExit ¶
func FLBPluginExit() int
FLBPluginExit method is invoked once the plugin instance is exited from the fluent-bit context.
func FLBPluginFlush ¶
FLBPluginFlush callback gets invoked by the fluent-bit runtime once there is data for the corresponding plugin in the pipeline, a data pointer, length and a tag are passed to the plugin interface implementation.
func FLBPluginInit ¶
FLBPluginInit this method gets invoked once by the fluent-bit runtime at initialisation phase. here all the plugin context should be initialised and any data or flag required for plugins to execute the collect or flush callback.
func FLBPluginInputCallback ¶
FLBPluginInputCallback this method gets invoked by the fluent-bit runtime, once the plugin has been initialised, the plugin implementation is responsible for handling the incoming data and the context that gets past, for long-living collectors the plugin itself should keep a running thread and fluent-bit will not execute further callbacks.
func FLBPluginInputCleanupCallback ¶ added in v0.1.6
FLBPluginInputCleanupCallback releases the memory used during the input callback
func FLBPluginRegister ¶
FLBPluginRegister registers a plugin in the context of the fluent-bit runtime, a name and description can be provided.
func RegisterInput ¶
func RegisterInput(name, desc string, in InputPlugin)
RegisterInput plugin. This function must be called only once per file.
func RegisterOutput ¶
func RegisterOutput(name, desc string, out OutputPlugin)
RegisterOutput plugin. This function must be called only once per file.
Types ¶
type ConfigLoader ¶
ConfigLoader interface to represent a fluent-bit configuration loader.
type Fluentbit ¶ added in v0.1.4
type Fluentbit struct {
Conf ConfigLoader
Metrics Metrics
Logger Logger
}
type InputPlugin ¶
type InputPlugin interface {
Init(ctx context.Context, fbit *Fluentbit) error
Collect(ctx context.Context, ch chan<- Message) error
}
InputPlugin interface to represent an input fluent-bit plugin.
type Logger ¶ added in v0.1.4
type Logger interface {
Error(format string, a ...any)
Warn(format string, a ...any)
Info(format string, a ...any)
Debug(format string, a ...any)
}
Logger interface to represent a fluent-bit logging mechanism.
type Message ¶
Message struct to store a fluent-bit message this is collected (input) or flushed (output) from a plugin implementation.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package configloader provides functionality to load Calyptia configurations from a set of specified configuration files.
|
Package configloader provides functionality to load Calyptia configurations from a set of specified configuration files. |
|
Package metric provides with Counter and Gauge interfaces.
|
Package metric provides with Counter and Gauge interfaces. |