config

package
v0.0.0-...-a8f6685 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Port           uint     `yaml:"Port" validate:"nonzero"`
	AggregatorPort uint     `yaml:"AggregatorPort" validate:"nonzero"`
	Username       string   `yaml:"Username" validate:"nonzero"`
	Password       string   `yaml:"Password" validate:"nonzero"`
	ForceHttps     bool     `yaml:"ForceHttps"`
	ProxyURIs      []string `yaml:"ProxyURIs"`
}

type Backend

type Backend struct {
	Host           string `yaml:"Host" validate:"nonzero"`
	Port           uint   `yaml:"Port" validate:"nonzero"`
	StatusPort     uint   `yaml:"StatusPort" validate:"nonzero"`
	StatusEndpoint string `yaml:"StatusEndpoint" validate:"nonzero"`
	Name           string `yaml:"Name" validate:"nonzero"`
}

type Config

type Config struct {
	Proxy      Proxy  `yaml:"Proxy" validate:"nonzero"`
	API        API    `yaml:"API" validate:"nonzero"`
	StaticDir  string `yaml:"StaticDir" validate:"nonzero"`
	HealthPort uint   `yaml:"HealthPort" validate:"nonzero"`
	Logger     lager.Logger
}

func NewConfig

func NewConfig(osArgs []string) (*Config, error)

func (Config) Validate

func (c Config) Validate() error

type Proxy

type Proxy struct {
	Port                     uint      `yaml:"Port" validate:"nonzero"`
	InactiveMysqlPort        uint      `yaml:"InactiveMysqlPort"`
	Backends                 []Backend `yaml:"Backends" validate:"min=1"`
	HealthcheckTimeoutMillis uint      `yaml:"HealthcheckTimeoutMillis" validate:"nonzero"`
	ShutdownDelaySeconds     uint      `yaml:"ShutdownDelaySeconds"`
}

func (Proxy) HealthcheckTimeout

func (p Proxy) HealthcheckTimeout() time.Duration

func (Proxy) ShutdownDelay

func (p Proxy) ShutdownDelay() time.Duration

Jump to

Keyboard shortcuts

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