Documentation
¶
Index ¶
Constants ¶
View Source
const ( LOAD_BALANCE_RR string = "round-robin" LOAD_BALANCE_LC string = "least-connection" SHARD_ALL string = "all" SHARD_SEGMENTS string = "segments" SHARD_SHARED_AND_SEGMENTS string = "shared-and-segments" ALWAYS_FORWARD string = "always_forward" SANITIZE_SET string = "sanitize_set" FORWARD string = "forward" )
Variables ¶
View Source
var AllowedForwardedClientCertModes = []string{ALWAYS_FORWARD, FORWARD, SANITIZE_SET}
View Source
var AllowedShardingModes = []string{SHARD_ALL, SHARD_SEGMENTS, SHARD_SHARED_AND_SEGMENTS}
View Source
var LoadBalancingStrategies = []string{LOAD_BALANCE_RR, LOAD_BALANCE_LC}
Functions ¶
This section is empty.
Types ¶
type BackendConfig ¶
type BackendConfig struct {
ClientAuthCertificate tls.Certificate
EnableTLS bool `yaml:"enable_tls"`
MaxConns int64 `yaml:"max_conns"`
TLSPem `yaml:",inline"` // embed to get cert_chain and private_key for client authentication
}
type Config ¶
type Config struct {
Status StatusConfig `yaml:"status,omitempty"`
Nats []NatsConfig `yaml:"nats,omitempty"`
Logging LoggingConfig `yaml:"logging,omitempty"`
Port uint16 `yaml:"port,omitempty"`
Index uint `yaml:"index,omitempty"`
Zone string `yaml:"zone,omitempty"`
GoMaxProcs int `yaml:"go_max_procs,omitempty"`
Tracing Tracing `yaml:"tracing,omitempty"`
TraceKey string `yaml:"trace_key,omitempty"`
AccessLog AccessLog `yaml:"access_log,omitempty"`
EnableAccessLogStreaming bool `yaml:"enable_access_log_streaming,omitempty"`
DebugAddr string `yaml:"debug_addr,omitempty"`
EnablePROXY bool `yaml:"enable_proxy,omitempty"`
EnableSSL bool `yaml:"enable_ssl,omitempty"`
SSLPort uint16 `yaml:"ssl_port,omitempty"`
DisableHTTP bool `yaml:"disable_http,omitempty"`
SSLCertificates []tls.Certificate `yaml:"-"`
TLSPEM []TLSPem `yaml:"tls_pem,omitempty"`
CACerts string `yaml:"ca_certs,omitempty"`
CAPool *x509.CertPool `yaml:"-"`
SkipSSLValidation bool `yaml:"skip_ssl_validation,omitempty"`
ForwardedClientCert string `yaml:"forwarded_client_cert,omitempty"`
ForceForwardedProtoHttps bool `yaml:"force_forwarded_proto_https,omitempty"`
SanitizeForwardedProto bool `yaml:"sanitize_forwarded_proto,omitempty"`
IsolationSegments []string `yaml:"isolation_segments,omitempty"`
RoutingTableShardingMode string `yaml:"routing_table_sharding_mode,omitempty"`
CipherString string `yaml:"cipher_suites,omitempty"`
CipherSuites []uint16 `yaml:"-"`
MinTLSVersionString string `yaml:"min_tls_version,omitempty"`
MinTLSVersion uint16 `yaml:"-"`
ClientCertificateValidationString string `yaml:"client_cert_validation,omitempty"`
ClientCertificateValidation tls.ClientAuthType `yaml:"-"`
LoadBalancerHealthyThreshold time.Duration `yaml:"load_balancer_healthy_threshold,omitempty"`
PublishStartMessageInterval time.Duration `yaml:"publish_start_message_interval,omitempty"`
PruneStaleDropletsInterval time.Duration `yaml:"prune_stale_droplets_interval,omitempty"`
DropletStaleThreshold time.Duration `yaml:"droplet_stale_threshold,omitempty"`
PublishActiveAppsInterval time.Duration `yaml:"publish_active_apps_interval,omitempty"`
StartResponseDelayInterval time.Duration `yaml:"start_response_delay_interval,omitempty"`
EndpointTimeout time.Duration `yaml:"endpoint_timeout,omitempty"`
EndpointDialTimeout time.Duration `yaml:"-"`
RouteServiceTimeout time.Duration `yaml:"route_services_timeout,omitempty"`
FrontendIdleTimeout time.Duration `yaml:"frontend_idle_timeout,omitempty"`
RouteLatencyMetricMuzzleDuration time.Duration `yaml:"route_latency_metric_muzzle_duration,omitempty"`
DrainWait time.Duration `yaml:"drain_wait,omitempty"`
DrainTimeout time.Duration `yaml:"drain_timeout,omitempty"`
SecureCookies bool `yaml:"secure_cookies,omitempty"`
HealthCheckUserAgent string `yaml:"healthcheck_user_agent,omitempty"`
OAuth OAuthConfig `yaml:"oauth,omitempty"`
RoutingApi RoutingApiConfig `yaml:"routing_api,omitempty"`
RouteServiceSecret string `yaml:"route_services_secret,omitempty"`
RouteServiceSecretPrev string `yaml:"route_services_secret_decrypt_only,omitempty"`
RouteServiceRecommendHttps bool `yaml:"route_services_recommend_https,omitempty"`
// These fields are populated by the `Process` function.
Ip string `yaml:"-"`
RouteServiceEnabled bool `yaml:"-"`
NatsClientPingInterval time.Duration `yaml:"nats_client_ping_interval,omitempty"`
NatsClientMessageBufferSize int `yaml:"-"`
Backends BackendConfig `yaml:"backends,omitempty"`
ExtraHeadersToLog []string `yaml:"extra_headers_to_log,omitempty"`
TokenFetcherMaxRetries uint32 `yaml:"token_fetcher_max_retries,omitempty"`
TokenFetcherRetryInterval time.Duration `yaml:"token_fetcher_retry_interval,omitempty"`
TokenFetcherExpirationBufferTimeInSeconds int64 `yaml:"token_fetcher_expiration_buffer_time,omitempty"`
PidFile string `yaml:"pid_file,omitempty"`
LoadBalance string `yaml:"balancing_algorithm,omitempty"`
DisableKeepAlives bool `yaml:"disable_keep_alives,omitempty"`
MaxIdleConns int `yaml:"max_idle_conns,omitempty"`
MaxIdleConnsPerHost int `yaml:"max_idle_conns_per_host,omitempty"`
}
func DefaultConfig ¶
func InitConfigFromFile ¶
func (*Config) Initialize ¶
func (*Config) NatsServers ¶
func (*Config) RoutingApiEnabled ¶
type LoggingConfig ¶
type LoggingConfig struct {
Syslog string `yaml:"syslog"`
SyslogAddr string
SyslogNetwork string
Level string `yaml:"level"`
LoggregatorEnabled bool `yaml:"loggregator_enabled"`
MetronAddress string `yaml:"metron_address"`
DisableLogForwardedFor bool `yaml:"disable_log_forwarded_for"`
DisableLogSourceIP bool `yaml:"disable_log_source_ip"`
// This field is populated by the `Process` function.
JobName string `yaml:"-"`
}
type NatsConfig ¶
type OAuthConfig ¶
type RoutingApiConfig ¶
type StatusConfig ¶
Click to show internal directories.
Click to hide internal directories.