config

package
v5.4.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 29, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config provides the winlogbeat specific configuration options.

Index

Constants

View Source
const (
	// DefaultRegistryFile specifies the default filename of the registry file.
	DefaultRegistryFile = ".winlogbeat.yml"
)

Variables

View Source
var (
	DefaultSettings = Settings{
		Winlogbeat: WinlogbeatConfig{
			RegistryFile: DefaultRegistryFile,
		},
	}
)

Functions

This section is empty.

Types

type MetricsConfig

type MetricsConfig struct {
	BindAddress string // Bind address for the metric service. Format is host:port.
}

MetricsConfig holds the configuration data for the HTTP metric service.

func (MetricsConfig) Validate

func (mc MetricsConfig) Validate() error

Validate validates the MetricsConfig data and returns an error describing any problems or nil.

type Settings

type Settings struct {
	Winlogbeat WinlogbeatConfig       `config:"winlogbeat"`
	Raw        map[string]interface{} `config:",inline"`
}

Settings is the root of the Winlogbeat configuration data hierarchy.

func (Settings) Validate

func (s Settings) Validate() error

Validate validates the Settings data and returns an error describing all problems or nil if there are none.

type Validator

type Validator interface {
	Validate() error
}

Validator is the interface for configuration data that can be validating.

Validate reads the configuration and validates all fields. An error describing all problems is returned (versus returning an error only for the first problem encountered).

type WinlogbeatConfig

type WinlogbeatConfig struct {
	EventLogs    []map[string]interface{} `config:"event_logs"`
	Metrics      MetricsConfig            `config:"metrics"`
	RegistryFile string                   `config:"registry_file"`
}

WinlogbeatConfig contains all of Winlogbeat configuration data.

func (WinlogbeatConfig) Validate

func (ebc WinlogbeatConfig) Validate() error

Validate validates the WinlogbeatConfig data and returns an error describing all problems or nil if there are none.

Jump to

Keyboard shortcuts

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