agent

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Pipeline pipeline.Config `json:"pipeline"                yaml:"pipeline"`
}

Config is the configuration of the stanza log agent.

func NewConfigFromFile

func NewConfigFromFile(file string) (*Config, error)

NewConfigFromFile will create a new agent config from a YAML file.

func NewConfigFromGlobs

func NewConfigFromGlobs(globs []string) (*Config, error)

NewConfigFromGlobs will create an agent config from multiple files matching a pattern.

type LogAgent

type LogAgent struct {
	*zap.SugaredLogger
	// contains filtered or unexported fields
}

LogAgent is an entity that handles log monitoring.

func (*LogAgent) Start

func (a *LogAgent) Start() (err error)

Start will start the log monitoring process

func (*LogAgent) Stop

func (a *LogAgent) Stop() (err error)

Stop will stop the log monitoring process

type LogAgentBuilder added in v0.9.12

type LogAgentBuilder struct {
	// contains filtered or unexported fields
}

LogAgentBuilder is a construct used to build a log agent

func NewBuilder added in v0.9.12

func NewBuilder(logger *zap.SugaredLogger) *LogAgentBuilder

NewBuilder creates a new LogAgentBuilder

func (*LogAgentBuilder) Build added in v0.9.12

func (b *LogAgentBuilder) Build() (*LogAgent, error)

Build will build a new log agent using the values defined on the builder

func (*LogAgentBuilder) WithConfig added in v0.12.2

func (b *LogAgentBuilder) WithConfig(cfg *Config) *LogAgentBuilder

WithConfig builds the agent with a given, pre-built config

func (*LogAgentBuilder) WithConfigFiles added in v0.12.2

func (b *LogAgentBuilder) WithConfigFiles(files []string) *LogAgentBuilder

WithConfigFiles adds a list of globs to the search path for config files

func (*LogAgentBuilder) WithDatabaseFile added in v0.9.12

func (b *LogAgentBuilder) WithDatabaseFile(databaseFile string) *LogAgentBuilder

WithDatabaseFile adds the specified database file when building a log agent

func (*LogAgentBuilder) WithDefaultOutput added in v0.9.12

func (b *LogAgentBuilder) WithDefaultOutput(defaultOutput operator.Operator) *LogAgentBuilder

WithDefaultOutput adds a default output when building a log agent

func (*LogAgentBuilder) WithPluginDir added in v0.9.12

func (b *LogAgentBuilder) WithPluginDir(pluginDir string) *LogAgentBuilder

WithPluginDir adds the specified plugin directory when building a log agent

Jump to

Keyboard shortcuts

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