Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CurrentVersion 当前版本 CurrentVersion = "1.0.0" // CurrentBranch 当前版本 CurrentBranch = "" // CurrentCommit 当前版本 CurrentCommit = "" // BuildTime 编译时间 BuildTime = "" // ConfigFilePath 默认配置文件路径 ConfigFilePath = "./tcip_relayer.yml" // BaseConf 基本配置全局变量 BaseConf = &BaseConfig{} // Config 配置全局变量 Config = &LocalConfig{} )
Functions ¶
Types ¶
type BaseConfig ¶
type BaseConfig struct {
GatewayID string `mapstructure:"gateway_id"` // 中继网关ID
GatewayName string `mapstructure:"gateway_name"` // 中继网关名称
DefaultTimeout int64 `mapstructure:"default_timeout"` // 默认的全局超时时间
}
BaseConfig 中继网关基本配置
type LocalConfig ¶
type LocalConfig struct {
BaseConfig *BaseConfig `mapstructure:"base"` // 中继网关基本配置,目前没什么用,留一个扩展
RpcConfig *RpcConfig `mapstructure:"rpc"` // Web监听配置
RelayChain *RelayChain `mapstructure:"relay_chain"` // Web监听配置
LogConfig []*logger.LogModuleConfig `mapstructure:"log"` // 日志配置
}
LocalConfig 本地配置信息
type RelayChain ¶
type RelayChain struct {
ChainmakerSdkConfigPath string `mapstructure:"chainmaker_sdk_config_path"`
Users []*User `mapstructure:"users"`
}
RelayChain 中继链配置
type RpcConfig ¶
type RpcConfig struct {
Port int `mapstructure:"port"` // 服务监听的端口号
TLSConfig tlsConfig `mapstructure:"tls"` // tls相关配置
BlackList []string `mapstructure:"blacklist"` // 黑名单
RestfulConfig restfulConfig `mapstructure:"restful"` // resultful api 网关
MaxSendMsgSize int `mapstructure:"max_send_msg_size"`
MaxRecvMsgSize int `mapstructure:"max_recv_msg_size"`
ClientKey string `mapstructure:"client_key"`
ClientCert string `mapstructure:"client_cert"`
}
RpcConfig rpc配置信息
Source Files
¶
- config.go
- types.go
Click to show internal directories.
Click to hide internal directories.