app

package
v0.0.0-...-14308cf Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindingManager

type BindingManager interface {
	Run()
	GetDrains(string) []egress.Writer
}

type Cache

type Cache struct {
	URL             string               `env:"CACHE_URL,              required, report"`
	CAFile          string               `env:"CACHE_CA_FILE_PATH,     required, report"`
	CertFile        string               `env:"CACHE_CERT_FILE_PATH,   required, report"`
	KeyFile         string               `env:"CACHE_KEY_FILE_PATH,    required, report"`
	CommonName      string               `env:"CACHE_COMMON_NAME,      required, report"`
	PollingInterval time.Duration        `env:"CACHE_POLLING_INTERVAL, report"`
	Blacklist       cups.BlacklistRanges `env:"BLACKLISTED_SYSLOG_RANGES", report`
}

type Config

type Config struct {
	BindingsPerAppLimit int           `env:"BINDING_PER_APP_LIMIT,    report"`
	DrainSkipCertVerify bool          `env:"DRAIN_SKIP_CERT_VERIFY,   report"`
	IdleDrainTimeout    time.Duration `env:"IDLE_DRAIN_TIMEOUT, report"`

	DebugPort uint16 `env:"DEBUG_PORT, report"`

	GRPC  GRPC
	Cache Cache
}

Config holds the configuration for the syslog agent

func LoadConfig

func LoadConfig() Config

LoadConfig will load the configuration for the syslog agent from the environment. If loading the config fails for any reason this function will panic.

type GRPC

type GRPC struct {
	Port         int      `env:"AGENT_PORT, report"`
	CAFile       string   `env:"AGENT_CA_FILE_PATH, required, report"`
	CertFile     string   `env:"AGENT_CERT_FILE_PATH, required, report"`
	KeyFile      string   `env:"AGENT_KEY_FILE_PATH, required, report"`
	CipherSuites []string `env:"AGENT_CIPHER_SUITES, report"`
}

GRPC stores the configuration for the router as a server using a PORT with mTLS certs and as a client.

type Metrics

type Metrics interface {
	NewGauge(name string, options ...metrics.MetricOption) metrics.Gauge
	NewCounter(name string, options ...metrics.MetricOption) metrics.Counter
}

type SyslogAgent

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

SyslogAgent manages starting the syslog agent service.

func NewSyslogAgent

func NewSyslogAgent(
	cfg Config,
	m Metrics,
	l *log.Logger,
) *SyslogAgent

NewSyslogAgent intializes and returns a new syslog agent.

func (*SyslogAgent) Run

func (s *SyslogAgent) Run()

Jump to

Keyboard shortcuts

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