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 }
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
Click to show internal directories.
Click to hide internal directories.