Version: v1.4.0 Latest Latest

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 1 Imported by: 0




View Source
const (
	LogFormatJSON  = "json"
	LogFormatPlain = "plain"


This section is empty.


This section is empty.


type Configurer

type Configurer interface {
	Name() string
	Start() error
	BootstrapCheck() (map[string]*InputConfigFile, error)
	OnAdd(ev *ContainerAddEvent) error
	OnDestroy(ev *ContainerDestroyEvent) error

Configurer receive events from discovery and manage input configurations

type ContainerAddEvent

type ContainerAddEvent struct {
	Container  container.Container
	LogConfigs []*LogConfig

ContainerAddEvent contains data for handling container update

type ContainerDestroyEvent

type ContainerDestroyEvent struct {
	Container container.Container

ContainerDestroyEvent contains data for handling container delete

type InputConfigFile

type InputConfigFile struct {
	Namespace   string
	Pod         string
	Container   string
	ContainerID string
	Version     string
	// Absolute filepath.
	Path string

type LogConfig

type LogConfig struct {
	Name string
	// LogFile is absolute path of the log file on host.
	LogFile string
	// Format defines log format.
	Format LogFormat
	// Tags are addtional informations that will be added to log record.
	// For example, pod informations, user defined tags.
	Tags        map[string]string
	InOpts      map[string]string
	Multiline   *MultilineSetting
	IgnoreOlder string
	Stdout      bool

type LogFormat

type LogFormat string

type MultilineSetting added in v1.1.3

type MultilineSetting struct {
	Pattern      string
	Negate       bool
	Match        string
	FlushPattern string
	MaxLines     int
	Timeout      string

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL