app

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accumulator

type Accumulator struct {
	// contains filtered or unexported fields
}

Accumulator is the constructor for the accumulator application.

func New

func New(cfg Config) *Accumulator

New configures and returns a new Accumulator

func (*Accumulator) Run

func (a *Accumulator) Run()

Run starts the accumulator. This is a blocking method call.

type Config

type Config struct {
	UAAAddr        string   `env:"UAA_ADDR,        required"`
	ClientID       string   `env:"CLIENT_ID,       required"`
	ClientSecret   string   `env:"CLIENT_SECRET,   required, noreport"`
	NozzleAddrs    []string `env:"NOZZLE_ADDRS,    required"`
	Port           uint16   `env:"PORT,            required"`
	SkipCertVerify bool     `env:"SKIP_CERT_VERIFY"`

	// RateInterval is used with the rates endpoint. This should match the
	// POLLING_INTERVAL of the nozzle.
	RateInterval time.Duration `env:"RATE_INTERVAL"`

	// VCapApplication is used to detect whether or not the application is
	// deployed as a CF application. If it is the NOZZLE_COUNT and
	// NOZZLE_APP_GUID  are required.
	VCapApplication string `env:"VCAP_APPLICATION"`
	NozzleCount     int    `env:"NOZZLE_COUNT"`
	NozzleAppGUID   string `env:"NOZZLE_APP_GUID"`
	LogWriter       io.Writer

	TLSConfig *tls.Config
}

Config stores configuration data for the accumulator.

func LoadConfig

func LoadConfig() Config

LoadConfig loads the configuration settings from the current environment.

Jump to

Keyboard shortcuts

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