Documentation ¶
Index ¶
- type Config
- type LogAgent
- type LogAgentBuilder
- func (b *LogAgentBuilder) Build() (*LogAgent, error)
- func (b *LogAgentBuilder) WithConfig(cfg *Config) *LogAgentBuilder
- func (b *LogAgentBuilder) WithConfigFiles(files []string) *LogAgentBuilder
- func (b *LogAgentBuilder) WithDefaultOutput(defaultOutput operator.Operator) *LogAgentBuilder
- func (b *LogAgentBuilder) WithPluginDir(pluginDir string) *LogAgentBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config is the configuration of the stanza log agent.
func NewConfigFromFile ¶
NewConfigFromFile will create a new agent config from a YAML file.
func NewConfigFromGlobs ¶
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.
type LogAgentBuilder ¶
type LogAgentBuilder struct {
// contains filtered or unexported fields
}
LogAgentBuilder is a construct used to build a log agent
func NewBuilder ¶
func NewBuilder(logger *zap.SugaredLogger) *LogAgentBuilder
NewBuilder creates a new LogAgentBuilder
func (*LogAgentBuilder) Build ¶
func (b *LogAgentBuilder) Build() (*LogAgent, error)
Build will build a new log agent using the values defined on the builder
func (*LogAgentBuilder) WithConfig ¶
func (b *LogAgentBuilder) WithConfig(cfg *Config) *LogAgentBuilder
WithConfig builds the agent with a given, pre-built config
func (*LogAgentBuilder) WithConfigFiles ¶
func (b *LogAgentBuilder) WithConfigFiles(files []string) *LogAgentBuilder
WithConfigFiles adds a list of globs to the search path for config files
func (*LogAgentBuilder) WithDefaultOutput ¶
func (b *LogAgentBuilder) WithDefaultOutput(defaultOutput operator.Operator) *LogAgentBuilder
WithDefaultOutput adds a default output when building a log agent
func (*LogAgentBuilder) WithPluginDir ¶
func (b *LogAgentBuilder) WithPluginDir(pluginDir string) *LogAgentBuilder
WithPluginDir adds the specified plugin directory when building a log agent