config

package
Version: v0.0.0-...-f6da7e6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2015 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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      string `yaml:"access_log"`
	DebugAddr      string `yaml:"debug_addr"`
	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

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

	PublishStartMessageIntervalInSeconds int  `yaml:"publish_start_message_interval"`
	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"`
	DrainTimeoutInSeconds                int  `yaml:"drain_timeout,omitempty"`
	SecureCookies                        bool `yaml:"secure_cookies"`

	OAuth      token_fetcher.OAuthConfig `yaml:"oauth"`
	RoutingApi RoutingApiConfig          `yaml:"routing_api"`

	// 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:"-"`
	DrainTimeout               time.Duration `yaml:"-"`
	Ip                         string        `yaml:"-"`
}

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 RoutingApiConfig

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

type StatusConfig

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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL