conf

package
v0.0.0-...-5cc2a90 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RAW represents a no-op/pass-through syslog parser
	RAW format.Format = &rawFormat{}

	// RFC3164 syslog parser
	RFC3164 format.Format = &format.RFC3164{}

	// RFC5424 syslog parser
	RFC5424 format.Format = &format.RFC5424{}

	// RFC6587 syslog parser
	RFC6587 format.Format = &format.RFC6587{}

	// DETECT represents a syslog parser that does a best-guess in parsing RFCXXXX syslog formats
	DETECT format.Format = &format.Automatic{}
)
View Source
var Instance = &Options{}

Instance is the default Options value

Functions

func Configure

func Configure()

Configure initializes and validates the default Options

Types

type Options

type Options struct {
	Out            *bool // keeping STDOUT as a boolean ensures it can only be specified once
	Destinations   []domain.Destination
	ConnectTimeout *uint64

	// logging
	Silent *bool
	Trace  *bool

	Server *ServerOptions
	// contains filtered or unexported fields
}

Options represents configuration

func (*Options) Bind

func (o *Options) Bind(targetConsole *consoleBinding)

Bind parses and applies options to the target

func (*Options) HasDestination

func (o *Options) HasDestination() bool

HasDestination returns whether or not there is at least one output destination configured

func (*Options) ServerMode

func (o *Options) ServerMode() bool

ServerMode returns whether or not to start a daemon

func (*Options) String

func (o *Options) String() string

func (*Options) Validate

func (o *Options) Validate() error

type ServerOptions

type ServerOptions struct {
	Parser     format.Format
	UnixSocket *string
	TCPService *string
	UDPService *string
}

ServerOptions represents daemon configuration

func (*ServerOptions) IsPassThrough

func (s *ServerOptions) IsPassThrough() bool

IsPassThrough returns true when skipping parsing

func (*ServerOptions) String

func (s *ServerOptions) String() string

Jump to

Keyboard shortcuts

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