Documentation ¶
Index ¶
- func WithLookup(l func(string) ([]net.IP, error)) func(*Agent)
- func WithV1Lookup(l func(string) ([]net.IP, error)) func(*AppV1)
- func WithV2Lookup(l func(string) ([]net.IP, error)) func(*AppV2)
- type Agent
- type AgentOption
- type AppV1
- type AppV1Option
- type AppV2
- type AppV2Option
- type Config
- type GRPC
- type MetricClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithLookup ¶
WithLookup allows the default DNS resolver to be changed.
func WithV1Lookup ¶
WithV1Lookup allows the default DNS resolver to be changed.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func NewAgent ¶
func NewAgent( c *Config, opts ...AgentOption, ) *Agent
type AppV1 ¶
type AppV1 struct {
// contains filtered or unexported fields
}
func NewV1App ¶
func NewV1App( c *Config, creds credentials.TransportCredentials, m MetricClient, opts ...AppV1Option, ) *AppV1
type AppV2 ¶
type AppV2 struct {
// contains filtered or unexported fields
}
func NewV2App ¶
func NewV2App( c *Config, clientCreds credentials.TransportCredentials, serverCreds credentials.TransportCredentials, metricClient MetricClient, opts ...AppV2Option, ) *AppV2
type Config ¶
type Config struct { Deployment string `env:"AGENT_DEPLOYMENT"` Zone string `env:"AGENT_ZONE"` Job string `env:"AGENT_JOB"` Index string `env:"AGENT_INDEX"` IP string `env:"AGENT_IP"` Tags map[string]string `env:"AGENT_TAGS"` DisableUDP bool `env:"AGENT_DISABLE_UDP"` IncomingUDPPort int `env:"AGENT_INCOMING_UDP_PORT"` MetricBatchIntervalMilliseconds uint `env:"AGENT_METRIC_BATCH_INTERVAL_MILLISECONDS"` MetricSourceID string `env:"AGENT_METRIC_SOURCE_ID"` DebugPort uint32 `env:"AGENT_DEBUG_PORT"` RouterAddr string `env:"ROUTER_ADDR"` RouterAddrWithAZ string `env:"ROUTER_ADDR_WITH_AZ"` GRPC GRPC }
Config stores all configurations options for the Agent.
func LoadConfig ¶
LoadConfig reads from the environment to create a Config.
type GRPC ¶
type GRPC struct { Port uint16 `env:"AGENT_PORT"` CAFile string `env:"AGENT_CA_FILE"` CertFile string `env:"AGENT_CERT_FILE"` KeyFile string `env:"AGENT_KEY_FILE"` CipherSuites []string `env:"AGENT_CIPHER_SUITES"` }
GRPC stores the configuration for the router as a server using a PORT with mTLS certs and as a client.
type MetricClient ¶
type MetricClient interface { NewCounter(name string, opts ...metrics.MetricOption) metrics.Counter NewGauge(name string, opts ...metrics.MetricOption) metrics.Gauge }
MetricClient is used to serve metrics.
Click to show internal directories.
Click to hide internal directories.