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 ¶
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()
Click to show internal directories.
Click to hide internal directories.