Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct { UDPAddress string `env:"AGENT_UDP_ADDRESS"` GRPCAddress string `env:"AGENT_GRPC_ADDRESS"` }
Agent stores configuration for communication to a logging/metric agent.
type CCTLSClientConfig ¶
type CCTLSClientConfig struct { CertFile string `env:"CC_CERT_FILE"` KeyFile string `env:"CC_KEY_FILE"` CAFile string `env:"CC_CA_FILE"` ServerName string `env:"CC_SERVER_NAME"` }
CCTLSClientConfig stores TLS cofiguration for communication with cloud controller.
type Config ¶
type Config struct { IP string `env:"TRAFFIC_CONTROLLER_IP"` ApiHost string `env:"TRAFFIC_CONTROLLER_API_HOST"` OutgoingDropsondePort uint32 `env:"TRAFFIC_CONTROLLER_OUTGOING_DROPSONDE_PORT"` SystemDomain string `env:"TRAFFIC_CONTROLLER_SYSTEM_DOMAIN"` SkipCertVerify bool `env:"TRAFFIC_CONTROLLER_SKIP_CERT_VERIFY"` UaaHost string `env:"TRAFFIC_CONTROLLER_UAA_HOST"` UaaClient string `env:"TRAFFIC_CONTROLLER_UAA_CLIENT"` UaaClientSecret string `env:"TRAFFIC_CONTROLLER_UAA_CLIENT_SECRET"` UaaCACert string `env:"TRAFFIC_CONTROLLER_UAA_CA_CERT"` SecurityEventLog string `env:"TRAFFIC_CONTROLLER_SECURITY_EVENT_LOG"` PProfPort uint32 `env:"TRAFFIC_CONTROLLER_PPROF_PORT"` MetricEmitterInterval time.Duration `env:"TRAFFIC_CONTROLLER_METRIC_EMITTER_INTERVAL"` HealthAddr string `env:"TRAFFIC_CONTROLLER_HEALTH_ADDR"` DisableAccessControl bool `env:"TRAFFIC_CONTROLLER_DISABLE_ACCESS_CONTROL"` RouterAddrs []string `env:"ROUTER_ADDRS"` CCTLSClientConfig CCTLSClientConfig Agent Agent GRPC GRPC }
Config stores all Configuration options for trafficcontroller.
func LoadConfig ¶
LoadConfig reads from the environment to create a Config.
type GRPC ¶
type GRPC struct { CAFile string `env:"ROUTER_CA_FILE"` CertFile string `env:"ROUTER_CERT_FILE"` KeyFile string `env:"ROUTER_KEY_FILE"` }
GRPC stores TLS configuration for gRPC communcation to router and agent.
type MetricClient ¶
type MetricClient interface { NewCounter(name string, opts ...metricemitter.MetricOption) *metricemitter.Counter NewGauge(name string, unit string, opts ...metricemitter.MetricOption) *metricemitter.Gauge EmitEvent(title string, body string) }
MetricClient can be used to emit metrics and events.
type TrafficController ¶
type TrafficController struct {
// contains filtered or unexported fields
}
func NewTrafficController ¶
func NewTrafficController( c *Config, disableAccessControl bool, metricClient MetricClient, uaaHTTPClient *http.Client, ccHTTPClient *http.Client, ) *TrafficController
func (*TrafficController) Start ¶
func (t *TrafficController) Start()
Click to show internal directories.
Click to hide internal directories.