加入网络层
This commit is contained in:
34
Server/Gateway/config/config.go
Normal file
34
Server/Gateway/config/config.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package config
|
||||
|
||||
type Config struct {
|
||||
App AppConfig `yaml:"app"`
|
||||
Log LogConfig `yaml:"log"`
|
||||
Grpc GrpcConfig `yaml:"grpc"`
|
||||
DB DBConfig `yaml:"db"`
|
||||
}
|
||||
|
||||
type AppConfig struct {
|
||||
Name string `yaml:"name"`
|
||||
}
|
||||
|
||||
type LogConfig struct {
|
||||
Debug bool `yaml:"debug"`
|
||||
MaxSize int `yaml:"max_size"`
|
||||
MaxBackups int `yaml:"max_backups"`
|
||||
MaxAge int `yaml:"max_age"`
|
||||
Level string `yaml:"level"`
|
||||
}
|
||||
|
||||
type GrpcConfig struct {
|
||||
Registry *struct {
|
||||
Address string `yaml:"address"`
|
||||
Port int `yaml:"port"`
|
||||
TTL int64 `yaml:"ttl"`
|
||||
} `yaml:"registry"`
|
||||
}
|
||||
|
||||
type DBConfig struct {
|
||||
Etcd *struct {
|
||||
Address []string `yaml:"address"`
|
||||
} `yaml:"etcd"`
|
||||
}
|
||||
Reference in New Issue
Block a user