config

package
v0.0.0-...-993a85b Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const DefaultBBSSyncInterval = durationjson.Duration(60 * time.Second)
View Source
const DefaultMCPConvergeInterval = durationjson.Duration(30 * time.Second)

Variables

View Source
var ValidLogLevels = []string{
	"debug",
	"info",
	"error",
	"fatal",
}

Functions

This section is empty.

Types

type BBSConfig

type BBSConfig struct {
	ServerCACertPath       string `validate:"nonzero"`
	ClientCertPath         string `validate:"nonzero"`
	ClientKeyPath          string `validate:"nonzero"`
	Address                string `validate:"nonzero"`
	ClientSessionCacheSize int
	MaxIdleConnsPerHost    int
	Disable                bool
	SyncInterval           durationjson.Duration
}

type Config

type Config struct {
	ListenAddressForCloudController string `validate:"nonzero"`
	ListenAddressForVIPResolver     string `validate:"nonzero"`
	ListenAddressForMCP             string `validate:"nonzero"`
	PilotClientCAPath               string `validate:"nonzero"`
	CloudControllerClientCAPath     string `validate:"nonzero"`
	ServerCertPath                  string `validate:"nonzero"`
	ServerKeyPath                   string `validate:"nonzero"`
	PolicyServerDisabled            bool
	PolicyServerAddress             string `validate:"nonzero"`
	PolicyServerClientCertPath      string `validate:"nonzero"`
	PolicyServerClientKeyPath       string `validate:"nonzero"`
	PolicyServerCAPath              string `validate:"nonzero"`
	VIPCIDR                         string `validate:"cidr"`
	MCPConvergeInterval             durationjson.Duration
	LogLevel                        string

	BBS     *BBSConfig
	TLSPems []certs.CertChainKeyPair
}

func Load

func Load(path string) (*Config, error)

func (*Config) GetVIPCIDR

func (c *Config) GetVIPCIDR() (*net.IPNet, error)

func (*Config) Save

func (c *Config) Save(path string) error

func (*Config) ServerTLSConfigForCloudController

func (c *Config) ServerTLSConfigForCloudController() (*tls.Config, error)

func (*Config) ServerTLSConfigForPilot

func (c *Config) ServerTLSConfigForPilot() (*tls.Config, error)

func (*Config) ServerTLSConfigForPolicyServer

func (c *Config) ServerTLSConfigForPolicyServer() (*tls.Config, error)

Jump to

Keyboard shortcuts

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