Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Name = self.Name Using = self.Using Install = self.Install Uninstall = self.Uninstall )
View Source
var With _Option
Functions ¶
This section is empty.
Types ¶
type ConfigOptions ¶
type ConfigOptions struct {
Format string // 配置格式(json,yaml,ini...)
LocalPath string // 本地配置文件路径
RemoteProvider string // 远端配置类型(etcd3,consul...)
RemoteEndpoint string // 远端地址
RemotePath string // 远端路径
AutoUpdate bool // 是否热更新
DefaultKVs map[string]any // 默认配置
}
ConfigOptions 所有选项
type IVisitConf ¶
type IVisitConf interface {
Sub(key string) IVisitConf
Get(key string) any
GetString(key string) string
GetBool(key string) bool
GetInt(key string) int
GetInt32(key string) int32
GetInt64(key string) int64
GetUint(key string) uint
GetUint16(key string) uint16
GetUint32(key string) uint32
GetUint64(key string) uint64
GetFloat64(key string) float64
GetTime(key string) time.Time
GetDuration(key string) time.Duration
GetIntSlice(key string) []int
GetStringSlice(key string) []string
GetStringMap(key string) map[string]any
GetStringMapString(key string) map[string]string
GetStringMapStringSlice(key string) map[string][]string
GetSizeInBytes(key string) uint
GetAllKeys() []string
GetAllSettings() map[string]any
}
IVisitConf 访问配置
Click to show internal directories.
Click to hide internal directories.