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: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	UDPPort              int `env:"UDP_PORT, report"`
	LoggregatorAgentGRPC GRPC
	DebugPort            int    `env:"DEBUG_PORT, report"`
	Deployment           string `env:"DEPLOYMENT, report"`
	Job                  string `env:"JOB, report"`
	Index                string `env:"INDEX, report"`
	IP                   string `env:"IP, report"`
}

Config holds the configuration for the UDP agent

func LoadConfig

func LoadConfig(log *log.Logger) Config

LoadConfig reads from the environment to create a Config.

type GRPC

type GRPC struct {
	Addr     string `env:"LOGGREGATOR_AGENT_ADDR, report"`
	CAFile   string `env:"LOGGREGATOR_AGENT_CA_FILE_PATH, required, report"`
	CertFile string `env:"LOGGREGATOR_AGENT_CERT_FILE_PATH, required, report"`
	KeyFile  string `env:"LOGGREGATOR_AGENT_KEY_FILE_PATH, required, report"`
}

GRPC stores the configuration for the UDP agent to connect to the loggregator agent via gRPC over mTLS.

type Metrics

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

type UDPForwarder

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

func NewUDPForwarder

func NewUDPForwarder(cfg Config, l *log.Logger, m Metrics) *UDPForwarder

func (*UDPForwarder) Run

func (u *UDPForwarder) Run()

Jump to

Keyboard shortcuts

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