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: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	UAAAddr           string        `env:"UAA_ADDR,         required"`
	ClientID          string        `env:"CLIENT_ID,        required"`
	ClientSecret      string        `env:"CLIENT_SECRET,    required, noreport"`
	LoggregatorAddr   string        `env:"LOGGREGATOR_ADDR, required"`
	Port              uint16        `env:"PORT,             required"`
	SubscriptionID    string        `env:"SUBSCRIPTION_ID,  required"`
	SkipCertVerify    bool          `env:"SKIP_CERT_VERIFY"`
	BufferSize        int           `env:"BUFFER_SIZE"`
	PollingInterval   time.Duration `env:"POLLING_INTERVAL"`
	MaxRateBuckets    int           `env:"MAX_RATE_BUCKETS"`
	IncludeRouterLogs bool          `env:"INCLUDE_ROUTER_LOGS"`

	// VCapApplication is used to detect whether or not the application is
	// deployed as a CF application.
	VCapApplication string `env:"VCAP_APPLICATION"`
	TLSConfig       *tls.Config

	LogWriter io.Writer
}

Config stores configuration data for the noisy neighbor client.

func LoadConfig

func LoadConfig() Config

LoadConfig loads the Config from the environment

type Nozzle

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

Nozzle is the top level data structure for the Nozzle application.

func New

func New(cfg Config) *Nozzle

New returns an initialized NoisyNeighbor. This will authenticate with UAA, open a connection to the firehose, and initialize all subprocesses.

func (*Nozzle) Addr

func (n *Nozzle) Addr() string

Addr returns the address that the NoisyNeighbor is bound to.

func (*Nozzle) Run

func (n *Nozzle) Run()

Run starts the NoisyNeighbor application. This is a blocking method call.

func (*Nozzle) Stop

func (n *Nozzle) Stop()

Stop gracefully stops the NoisyNeighbor application. It will disconnect from the firehose, and complete any active HTTP requests.

Jump to

Keyboard shortcuts

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