config

package
v5.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SeekPositionCursor  = "cursor"
	SeekPositionHead    = "head"
	SeekPositionTail    = "tail"
	SeekPositionDefault = "none"
)

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,
		},
		DefaultType: "journal",
	}
)

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"`
	JournalPaths         []string           `config:"journal_paths"`
}

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