config

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvFile         = ".env"
	EnvConfigPrefix = "STREAMDAL_LOG_PROCESSOR"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Version                   kong.VersionFlag `help:"Show version and exit" short:"v" env:"-"`
	APIListenAddress          string           `kong:"default=':9100',help='API listen address (serves health, metrics, version).'"`
	LogstashAddr              string           `kong:"default=':6001',help='Address of the logstash server to forward logs to.'"`
	LogstashListenAddr        string           `kong:"default=':6000',help='Address to listen on for TCP requests (from Logstash).'"`
	LogstashReconnectInterval time.Duration    `kong:"default='60s',help='The interval to wait before reconnecting to logstash.'"`
	StreamdalServerAddress    string           `kong:"default=':8082',help='Streamdal server grpc API address'"`
	StreamdalServerToken      string           `kong:"default='1234',help='Token used for authenticating with Streamdal server'"`
	StreamdalServiceName      string           `kong:"default='log-processor',help='Name of the service to use when registering with streamdal'"`
	NumSenders                int              `kong:"default='1',help='Number of concurrent senders to use when sending logs to logstash.'"`
	NumProcessors             int              `kong:"default='1',help='Number of concurrent processors to use when processing logs.'"`
	FilePathAware             bool             `kong:"default='false',help='Enables or disables file path awareness in the log processor.'"`
	ProcessBufferSize         int              `kong:"default='100',help='Size of the process buffer.'"`
	SendBufferSize            int              `kong:"default='100',help='Size of the send buffer.'"`
	Debug                     bool             `kong:"default='false',help='Enable debug logging.'"`
	LogLevel                  string           `kong:"default='INFO',help='Log level to use.',enum='DEBUG,INFO,WARN,ERROR,FATAL,PANIC,TRACE'"`

	KongContext *kong.Context `kong:"-"`
}

func New

func New(version string) *Config

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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