Documentation
¶
Index ¶
- type Handler
- func New(filePath string) *Handler
- func NewFile(filePath string, dynamic bool) *Handler
- func NewNacos(baseInfo *NacosBase) *Handler
- func NewTomlData(content string) *Handler
- func NewYamlData(content string) *Handler
- func ReloadTomlData(content string) (*Handler, error)
- func ReloadYamlData(content string) (*Handler, error)
- func (c *Handler) Exists(parse string) bool
- func (c *Handler) GetBool(key string) bool
- func (c *Handler) GetDuration(key string) time.Duration
- func (c *Handler) GetInt(key string) int
- func (c *Handler) GetInt64(key string) int64
- func (c *Handler) GetMap(parse string) map[string]interface{}
- func (c *Handler) GetSliceInt(key string) []int
- func (c *Handler) GetSliceInt64(key string) []int64
- func (c *Handler) GetSliceString(key string) []string
- func (c *Handler) GetString(key string) string
- func (c *Handler) ParseNode(parse string) (ret interface{})
- func (c *Handler) ReloadFile() *Handler
- func (c *Handler) StartDynamic() *Handler
- func (c *Handler) UnmarshalKey(key string, rawVal interface{}) error
- type NacosBase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶ added in v0.1.3
配置对象
func NewNacos ¶ added in v0.1.5
NewNacosData get a cfg handler by toml string content nacos目前没有toml支持,暂时统一使用yaml格式
func NewTomlData ¶ added in v0.1.1
NewTomlData get a cfg handler by toml string content
func NewYamlData ¶ added in v0.1.1
NewTomlData get a cfg handler by toml string content
func ReloadTomlData ¶ added in v0.1.8
ReloadTomlData get a cfg handler by toml string content
func ReloadYamlData ¶ added in v0.1.7
ReloadYamlData get a cfg handler by toml string content
func (*Handler) GetDuration ¶ added in v0.1.3
GetDuration get config time.Duration type
func (*Handler) GetSliceInt ¶ added in v0.1.3
GetSliceInt get slice int type
func (*Handler) GetSliceInt64 ¶ added in v0.1.3
GetSliceInt64 get slice int64 type
func (*Handler) GetSliceString ¶ added in v0.1.3
GetSliceString get slice string type
func (*Handler) ReloadFile ¶ added in v0.2.0
ReloadFile get a cfg handler by file path reload config
func (*Handler) StartDynamic ¶ added in v0.2.0
StartDynamic after start listen config file change
func (*Handler) UnmarshalKey ¶ added in v0.2.0
UnmarshalKey Unmarshal config to struct
type NacosBase ¶ added in v0.1.5
type NacosBase struct { ConfigClient config_client.IConfigClient GroupId string DataId string }
Click to show internal directories.
Click to hide internal directories.