Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AppEnv = &struct { Env string `yaml:"app-env"` }{ Env: "DEV", }
AppEnv 标记当前服务进程的运行环境
View Source
var AppSign = &struct { Sign map[string]string `yaml:"sign"` }{ Sign: make(map[string]string), }
AppSign 配置文件 - 所有服务的签名配置(在微服务间通讯时验签)
View Source
var BootConfig = &BoostrapConfig{HttpPort: "8080"}
BootConfig 项目启动引导配置
View Source
var PriorityNetwork = &struct { Networks []string `yaml:"priority-network"` }{ Networks: make([]string, 0), }
PriorityNetwork 优先网卡选择配置
Functions ¶
func GetConfigSecretKey ¶
func GetConfigSecretKey() string
GetConfigSecretKey 获取配置加密密钥(不同环境有不同的密钥,用以解密nacos配置文件中使用ENC()的加密字符串)
Types ¶
type BoostrapConfig ¶
type BoostrapConfig struct { HttpPort string Logger Logger `yaml:"logger"` Nacos Nacos `yaml:"nacos"` ConfigSecretKey string `yaml:"config-secret-key"` }
BoostrapConfig bootstrap.yml 对应结构体
type Logger ¶ added in v0.3.3
type Logger struct {
Path string `json:"path"`
}
Logger bootstrap.yml 对应结构体
type Nacos ¶ added in v0.3.3
type Nacos struct { Addr string `yaml:"addr"` Namespace string `yaml:"namespace"` Username string `yaml:"username"` Password string `yaml:"password"` AppName string `yaml:"app-name"` DataIds string `yaml:"data-ids"` Cluster string `yaml:"cluster"` AvailabilityCluster string `yaml:"availability-cluster"` }
Nacos bootstrap.yml 对应结构体
Click to show internal directories.
Click to hide internal directories.