Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonConfig ¶
type CommonConfig struct {
SvcName string `toml:"svc-name"`
ListenHost string `toml:"listen-host"`
DebugPort string `toml:"debug-port"`
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"`
RateLimit int `toml:"rate-limit"`
}
CommonConfig 服务通用配置部分
type ConfigFile ¶
type ConfigFile struct {
Common *CommonConfig `toml:"common"`
GRPC *GRPCConfig `toml:"grpc"`
HTTP *HTTPConfig `toml:"http"`
}
ConfigFile 服务配置对象定义
func ParseConfigFile ¶
func ParseConfigFile(filePath string, logger log.Logger) *ConfigFile
ParseConfigFile 解析配置文件方法
Click to show internal directories.
Click to hide internal directories.