config

package
v0.0.0-...-a0650b7 Latest Latest
Warning

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

Go to latest
Published: May 26, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Sep      = ","
	Wildcard = "*"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Name   string                    `hcl:"-" json:"-"`
	Host   string                    `hcl:"host,omitempty" json:"host,omitempty"`
	GRPC   *bool                     `hcl:"grpc,omitempty" json:"grpc,omitempty"`
	CA     []string                  `hcl:"ca" json:"ca"`
	ProxyM []map[string]*ProxyConfig `hcl:"proxy,omitempty" json:"proxy,omitempty"`
	Proxy  []*ProxyConfig            `hcl:"-" json:"-"`
	// contains filtered or unexported fields
}

func (*AppConfig) GetCA

func (this *AppConfig) GetCA() []string

func (*AppConfig) GetGRPC

func (this *AppConfig) GetGRPC() bool

type ProxyConfig

type ProxyConfig struct {
	Name               string   `hcl:"-" json:"-"`
	URI                string   `hcl:"uri,omitempty" json:"uri,omitempty"`
	Host               string   `hcl:"host,omitempty" json:"host,omitempty"`
	GRPC               *bool    `hcl:"grpc,omitempty" json:"grpc,omitempty"`
	Backend            string   `hcl:"backend,omitempty" json:"backend,omitempty"`
	Policy             string   `hcl:"policy,omitempty" json:"policy,omitempty"`
	CA                 []string `hcl:"ca" json:"ca"`
	TLS                bool     `hcl:"tls,omitempty" json:"tls,omitempty"`
	InsecureSkipVerify bool     `hcl:"insecure_skip_verify,omitempty" json:"insecure_skip_verify,omitempty"`
	// contains filtered or unexported fields
}

func (*ProxyConfig) GetCA

func (this *ProxyConfig) GetCA() []string

func (*ProxyConfig) GetGRPC

func (this *ProxyConfig) GetGRPC() bool

type ServerConfig

type ServerConfig struct {
	Bind []string                `hcl:"bind,omitempty" json:"bind,omitempty"`
	Cert []string                `hcl:"cert,omitempty" json:"cert,omitempty"`
	CA   []string                `hcl:"ca" json:"ca"`
	GRPC bool                    `hcl:"grpc,omitempty" json:"grpc,omitempty"`
	AppM []map[string]*AppConfig `hcl:"app,omitempty" json:"app,omitempty"`
	App  []*AppConfig            `hcl:"-" json:"-"`
}

func ReadConfig

func ReadConfig(filename string) (ServerConfig, error)

func (*ServerConfig) Init

func (this *ServerConfig) Init()

func (*ServerConfig) Read

func (this *ServerConfig) Read(filename string) error

Jump to

Keyboard shortcuts

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