config

package
v0.0.0-...-9267b80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2016 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLog

type AccessLog struct {
	File            string `yaml:"file"`
	EnableStreaming bool   `yaml:"enable_streaming"`
}

type Config

type Config struct {
	Status                   StatusConfig  `yaml:"status"`
	Nats                     []NatsConfig  `yaml:"nats"`
	Logging                  LoggingConfig `yaml:"logging"`
	Port                     uint16        `yaml:"port"`
	Index                    uint          `yaml:"index"`
	Zone                     string        `yaml:"zone"`
	GoMaxProcs               int           `yaml:"go_max_procs,omitempty"`
	TraceKey                 string        `yaml:"trace_key"`
	AccessLog                AccessLog     `yaml:"access_log"`
	EnableAccessLogStreaming bool          `yaml:"enable_access_log_streaming"`
	DebugAddr                string        `yaml:"debug_addr"`
	EnablePROXY              bool          `yaml:"enable_proxy"`
	EnableSSL                bool          `yaml:"enable_ssl"`
	SSLPort                  uint16        `yaml:"ssl_port"`
	SSLCertPath              string        `yaml:"ssl_cert_path"`
	SSLKeyPath               string        `yaml:"ssl_key_path"`
	SSLCertificate           tls.Certificate
	SkipSSLValidation        bool `yaml:"skip_ssl_validation"`

	CipherString string `yaml:"cipher_suites"`
	CipherSuites []uint16

	PublishStartMessageIntervalInSeconds int  `yaml:"publish_start_message_interval"`
	SuspendPruningIfNatsUnavailable      bool `yaml:"suspend_pruning_if_nats_unavailable"`
	PruneStaleDropletsIntervalInSeconds  int  `yaml:"prune_stale_droplets_interval"`
	DropletStaleThresholdInSeconds       int  `yaml:"droplet_stale_threshold"`
	PublishActiveAppsIntervalInSeconds   int  `yaml:"publish_active_apps_interval"`
	StartResponseDelayIntervalInSeconds  int  `yaml:"start_response_delay_interval"`
	EndpointTimeoutInSeconds             int  `yaml:"endpoint_timeout"`
	RouteServiceTimeoutInSeconds         int  `yaml:"route_services_timeout"`

	DrainWaitInSeconds    int  `yaml:"drain_wait,omitempty"`
	DrainTimeoutInSeconds int  `yaml:"drain_timeout,omitempty"`
	SecureCookies         bool `yaml:"secure_cookies"`

	OAuth                      OAuthConfig      `yaml:"oauth"`
	RoutingApi                 RoutingApiConfig `yaml:"routing_api"`
	RouteServiceSecret         string           `yaml:"route_services_secret"`
	RouteServiceSecretPrev     string           `yaml:"route_services_secret_decrypt_only"`
	RouteServiceRecommendHttps bool             `yaml:"route_services_recommend_https"`
	// These fields are populated by the `Process` function.
	PruneStaleDropletsInterval time.Duration `yaml:"-"`
	DropletStaleThreshold      time.Duration `yaml:"-"`
	PublishActiveAppsInterval  time.Duration `yaml:"-"`
	StartResponseDelayInterval time.Duration `yaml:"-"`
	EndpointTimeout            time.Duration `yaml:"-"`
	RouteServiceTimeout        time.Duration `yaml:"-"`
	DrainWait                  time.Duration `yaml:"-"`
	DrainTimeout               time.Duration `yaml:"-"`
	Ip                         string        `yaml:"-"`
	RouteServiceEnabled        bool          `yaml:"-"`
	TokenFetcherRetryInterval  time.Duration `yaml:"-"`
	NatsClientPingInterval     time.Duration `yaml:"-"`

	ExtraHeadersToLog []string `yaml:"extra_headers_to_log"`

	TokenFetcherMaxRetries                    uint32 `yaml:"token_fetcher_max_retries"`
	TokenFetcherRetryIntervalInSeconds        int    `yaml:"token_fetcher_retry_interval"`
	TokenFetcherExpirationBufferTimeInSeconds int64  `yaml:"token_fetcher_expiration_buffer_time"`

	PidFile string `yaml:"pid_file"`
}

func DefaultConfig

func DefaultConfig() *Config

func InitConfigFromFile

func InitConfigFromFile(path string) *Config

func (*Config) Initialize

func (c *Config) Initialize(configYAML []byte) error

func (*Config) NatsServers

func (c *Config) NatsServers() []string

func (*Config) Process

func (c *Config) Process()

func (*Config) RoutingApiEnabled

func (c *Config) RoutingApiEnabled() bool

type LoggingConfig

type LoggingConfig struct {
	File               string `yaml:"file"`
	Syslog             string `yaml:"syslog"`
	Level              string `yaml:"level"`
	LoggregatorEnabled bool   `yaml:"loggregator_enabled"`
	MetronAddress      string `yaml:"metron_address"`

	// This field is populated by the `Process` function.
	JobName string `yaml:"-"`
}

type NatsConfig

type NatsConfig struct {
	Host string `yaml:"host"`
	Port uint16 `yaml:"port"`
	User string `yaml:"user"`
	Pass string `yaml:"pass"`
}

type OAuthConfig

type OAuthConfig struct {
	TokenEndpoint     string `yaml:"token_endpoint"`
	Port              int    `yaml:"port"`
	SkipSSLValidation bool   `yaml:"skip_ssl_validation"`
	ClientName        string `yaml:"client_name"`
	ClientSecret      string `yaml:"client_secret"`
	CACerts           string `yaml:"ca_certs"`
}

type RoutingApiConfig

type RoutingApiConfig struct {
	Uri          string `yaml:"uri"`
	Port         int    `yaml:"port"`
	AuthDisabled bool   `yaml:"auth_disabled"`
}

type StatusConfig

type StatusConfig struct {
	Port uint16 `yaml:"port"`
	User string `yaml:"user"`
	Pass string `yaml:"pass"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL