app

package
Version: v0.0.0-...-2d916a5 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindingFetcher

type BindingFetcher interface {
	FetchBindings() ([]syslog.Binding, error)
}

type Config

type Config struct {
	UseRFC3339 bool `env:"USE_RFC3339"`
	// DownstreamIngressPortCfg will define consumers on localhost that will
	// receive each envelope. It is assumed to adhere to the Loggregator Ingress
	// Service and use the provided TLS configuration.
	DownstreamIngressPortCfg string `env:"DOWNSTREAM_INGRESS_PORT_GLOB, report"`
	GRPC                     GRPC
	MetricsServer            config.MetricsServer
	Tags                     map[string]string `env:"AGENT_TAGS"`
}

Config holds the configuration for the forwarder agent

func LoadConfig

func LoadConfig() Config

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

type ForwarderAgent

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

ForwarderAgent manages starting the forwarder agent service.

func NewForwarderAgent

func NewForwarderAgent(
	cfg Config,
	m Metrics,
	log *log.Logger,
) *ForwarderAgent

NewForwarderAgent intializes and returns a new forwarder agent.

func (ForwarderAgent) Run

func (s ForwarderAgent) Run()

type GRPC

type GRPC struct {
	Port         uint16   `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, helpText string, opts ...metrics.MetricOption) metrics.Gauge
	NewCounter(name, helpText string, opts ...metrics.MetricOption) metrics.Counter
}

type Writer

type Writer interface {
	Write(*loggregator_v2.Envelope) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL