Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
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 { UseRFC339 bool `env:"USE_RFC339"` IP string `env:"TRAFFIC_CONTROLLER_IP, report"` ApiHost string `env:"TRAFFIC_CONTROLLER_API_HOST, report"` OutgoingDropsondePort uint32 `env:"TRAFFIC_CONTROLLER_OUTGOING_DROPSONDE_PORT, report"` OutgoingCertFile string `env:"TRAFFIC_CONTROLLER_OUTGOING_CERT_FILE, report"` OutgoingKeyFile string `env:"TRAFFIC_CONTROLLER_OUTGOING_KEY_FILE, report"` SystemDomain string `env:"TRAFFIC_CONTROLLER_SYSTEM_DOMAIN, report"` SkipCertVerify bool `env:"TRAFFIC_CONTROLLER_SKIP_CERT_VERIFY, report"` UaaHost string `env:"TRAFFIC_CONTROLLER_UAA_HOST, report"` UaaClient string `env:"TRAFFIC_CONTROLLER_UAA_CLIENT, report"` UaaClientSecret string `env:"TRAFFIC_CONTROLLER_UAA_CLIENT_SECRET"` UaaCACert string `env:"TRAFFIC_CONTROLLER_UAA_CA_CERT, report"` SecurityEventLog string `env:"TRAFFIC_CONTROLLER_SECURITY_EVENT_LOG, report"` PProfPort uint32 `env:"TRAFFIC_CONTROLLER_PPROF_PORT, report"` MetricEmitterInterval time.Duration `env:"TRAFFIC_CONTROLLER_METRIC_EMITTER_INTERVAL, report"` DisableAccessControl bool `env:"TRAFFIC_CONTROLLER_DISABLE_ACCESS_CONTROL, report"` RouterAddrs []string `env:"ROUTER_ADDRS, report"` 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.