config

package
v0.0.0-...-628bcb8 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2014 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 4 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"`
	LoggregatorConfig LoggregatorConfig `yaml:"loggregatorConfig"`

	Port       uint16 `yaml:"port"`
	Index      uint   `yaml:"index"`
	Pidfile    string `yaml:"pidfile"`
	GoMaxProcs int    `yaml:"go_max_procs,omitempty"`
	TraceKey   string `yaml:"trace_key"`
	AccessLog  string `yaml:"access_log"`

	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"`

	// These fields are populated by the `Process` function.
	PruneStaleDropletsInterval time.Duration
	DropletStaleThreshold      time.Duration
	PublishActiveAppsInterval  time.Duration
	StartResponseDelayInterval time.Duration
	EndpointTimeout            time.Duration

	Ip string
}

func DefaultConfig

func DefaultConfig() *Config

func InitConfigFromFile

func InitConfigFromFile(path string) *Config

func (*Config) Initialize

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

func (*Config) Process

func (c *Config) Process()

type LoggingConfig

type LoggingConfig struct {
	File   string `yaml:"file"`
	Syslog string `yaml:"syslog"`
	Level  string `yaml:"level"`
}

type LoggregatorConfig

type LoggregatorConfig struct {
	Url          string `yaml:"url"`
	SharedSecret string `yaml:"shared_secret"`
}

type NatsConfig

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

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