plugin

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: Apache-2.0 Imports: 16 Imported by: 3

README

Fluent-bit base plugin interfaces.

This package contains the required interfaces and data types required to create [Fluent Bit][fluent-bit] plugins.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FLBPluginExit

func FLBPluginExit() int

func FLBPluginFlush

func FLBPluginFlush(data unsafe.Pointer, clength C.int, ctag *C.char) int

func FLBPluginInit

func FLBPluginInit(ptr unsafe.Pointer) int

func FLBPluginInputCallback

func FLBPluginInputCallback(data *unsafe.Pointer, csize *C.size_t) int

func FLBPluginRegister

func FLBPluginRegister(def unsafe.Pointer) int

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

type ConfigLoader interface {
	String(key string) string
}

type InputPlugin

type InputPlugin interface {
	Init(ctx context.Context, conf ConfigLoader) error
	Collect(ctx context.Context, ch chan<- Message) error
}

type Message

type Message struct {
	Time   time.Time
	Record map[string]string
	// contains filtered or unexported fields
}

func (Message) Tag

func (m Message) Tag() string

Tag is available at output.

type OutputPlugin

type OutputPlugin interface {
	Init(ctx context.Context, conf ConfigLoader) error
	Flush(ctx context.Context, ch <-chan Message) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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