config

package
v5.6.9+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2018 License: Apache-2.0 Imports: 4 Imported by: 9

Documentation

Index

Constants

View Source
const (
	SeekPositionCursor         = "cursor"
	SeekPositionHead           = "head"
	SeekPositionTail           = "tail"
	SeekPositionDefault        = "none"
	CompletedQueueSize  uint16 = 2 << 12
)

Named constants for the journal cursor placement positions

Variables

View Source
var (

	// DefaultConfig is an instance of Config with default settings
	DefaultConfig = Config{
		SeekPosition:       SeekPositionTail,
		CursorStateFile:    ".journalbeat-cursor-state",
		CursorFlushPeriod:  5 * time.Second,
		CursorSeekFallback: SeekPositionTail,
		PendingQueue: pendingQueueConfig{
			File:               ".journalbeat-pending-queue",
			FlushPeriod:        1 * time.Second,
			CompletedQueueSize: CompletedQueueSize,
		},
		DefaultType: "journal",
		Kernel:      true,
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	SeekPosition         string             `config:"seek_position"`
	ConvertToNumbers     bool               `config:"convert_to_numbers"`
	CleanFieldNames      bool               `config:"clean_field_names"`
	WriteCursorState     bool               `config:"write_cursor_state"`
	CursorStateFile      string             `config:"cursor_state_file"`
	CursorFlushPeriod    time.Duration      `config:"cursor_flush_period" validate:"min=0"`
	PendingQueue         pendingQueueConfig `config:"pending_queue"`
	CursorSeekFallback   string             `config:"cursor_seek_fallback"`
	MoveMetadataLocation string             `config:"move_metadata_to_field"`
	DefaultType          string             `config:"default_type"`
	Units                []string           `config:"units"`
	Kernel               bool               `config:"kernel"`
	Identifiers          []string           `config:"identifiers"`
	JournalPaths         []string           `config:"journal_paths"`
	MatchPatterns        []string           `config:"match_patterns"`
	ParseSyslogFacility  bool               `config:"parse_syslog_facility"`
	ParsePriority        bool               `config:"parse_priority"`
}

Config provides the config settings for the journald reader

func (*Config) Validate

func (config *Config) Validate() error

Validate turns Config into implementation of Validator and will be executed when Unpack is called

Jump to

Keyboard shortcuts

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