Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoggingOptions ¶
type LoggingOptions struct { Level string `properties:"logging.level,default=info"` FilePath string `properties:"logging.file.path,default=."` File bool `properties:"logging.file,default=false"` FileName string `properties:"logging.file.name,default=app.log"` FileLevel bool `properties:"logging.file.level,default=false"` FileLimit string `properties:"logging.file.limit,default=100MB"` FileRate uint64 `properties:"logging.file.rate,default=30"` }
日志配置
var LoggingOptionsInstance *LoggingOptions
type LoggingOptionsFun ¶
type LoggingOptionsFun interface {
Apply(*LoggingOptions)
}
func WithFilePath ¶
func WithFilePath(s string) LoggingOptionsFun
type RegistryOptions ¶
type RegistryOptions struct { ServerHost []string `properties:"discovery.server.host,default=127.0.0.1:2379"` ServerNameSpace string `properties:"discovery.server.namespace,default=haodoings.com"` ServerRegion string `properties:"discovery.server.region,default=default"` ServerZone string `properties:"discovery.server.zone,default=default"` InstanceIntervalTime uint64 `properties:"discovery.server.instance.interval.time,default=1"` InstanceName string `properties:"discovery.server.instance.name,default=haze"` InstanceWeight float64 `properties:"discovery.server.instance.weight,default=10"` InstanceMetadata map[string]string `properties:"discovery.server.instance.metadata,default="` }
RegistryOptions 注册中心配置
var RegistryOptionsInstance *RegistryOptions
type RegistryOptionsFun ¶
type RegistryOptionsFun interface {
Apply(*RegistryOptions)
}
func WithInstanceName ¶
func WithInstanceName(s string) RegistryOptionsFun
type ServerOptions ¶
type ServerOptions struct { Host string `properties:"server.host,default=127.0.0.1"` Port uint64 `properties:"server.port,default=80"` Name string `properties:"server.name,default=haze"` }
服务配置
var ServerOptionsInstance *ServerOptions
Click to show internal directories.
Click to hide internal directories.