Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
PrefixURI string `toml:"prefix-uri"`
Version string `toml:"version"`
Hystries map[string]Hystrix `toml:"hystries"`
}
Adapter 适配器对象
type CommonConfig ¶
type CommonConfig struct {
ListenHost string `toml:"listen-host"`
HTTPPort string `toml:"http-port"`
HTTPCACert string `toml:"http-ca-cert"`
HTTPCert string `toml:"http-cert"`
HTTPKey string `toml:"http-key"`
VerifyClientCert bool `toml:"verify-client-cert"`
SRDETCDServers string `toml:"srd-etcd-servers"`
SRDETCDCaCert string `toml:"srd-etcd-ca-cert"`
SRDETCDCert string `toml:"srd-etcd-cert"`
SRDETCDKey string `toml:"srd-etcd-key"`
SRDPrefix string `toml:"srd-prefix"`
AdapterDir string `toml:"adapter-dir"`
GracefulTimeout time.Duration `toml:"graceful-timeout"`
}
CommonConfig 服务通用配置部分
type ConfigFile ¶
type ConfigFile struct {
Common *CommonConfig `toml:"common"`
Adapters map[string]Adapter `toml:"adapters"`
}
ConfigFile 服务配置对象定义
func ParseConfigFile ¶
func ParseConfigFile(filePath string, logger log.Logger) *ConfigFile
ParseConfigFile 解析配置文件方法
Click to show internal directories.
Click to hide internal directories.