Documentation
¶
Index ¶
- Constants
- func Get(key string) string
- func GetByKind(kind, key string) string
- func GetByKindByDefault(kind, key string, defaultValue string) string
- func GetInt(key string) int
- func GetIntByKind(kind, key string) int
- func GetIntByKindOrDefault(kind, key string, defaultValue int) int
- func GetIntOrDefault(key string, defaultValue int) int
- func GetJSON(key string, out interface{})
- func GetJSONByKind(kind, key string, out interface{})
- func GetOrDefault(key string, defaultValue string) string
- func GetYaml(key string, out interface{})
- func GetYamlByKind(kind, key string, out interface{})
- func MonitorChange(kind, key string, callback ConfigChangeCallback)
- type ConfigChangeCallback
- type IClient
- type NacosClient
Constants ¶
View Source
const (
EnvNacosAddr = "env_nacos_addr"
)
Variables ¶
This section is empty.
Functions ¶
func GetByKindByDefault ¶
func GetIntByKind ¶
func GetIntByKindOrDefault ¶
func GetIntOrDefault ¶
func GetJSONByKind ¶
func GetJSONByKind(kind, key string, out interface{})
func GetOrDefault ¶
func GetYamlByKind ¶
func GetYamlByKind(kind, key string, out interface{})
func MonitorChange ¶
func MonitorChange(kind, key string, callback ConfigChangeCallback)
Types ¶
type ConfigChangeCallback ¶
type ConfigChangeCallback func(newvalue string)
type NacosClient ¶
type NacosClient struct {
// contains filtered or unexported fields
}
func NewNacosClient ¶
func NewNacosClient() (*NacosClient, error)
func (*NacosClient) BatchGet ¶
func (client *NacosClient) BatchGet(kind string, keys ...string) map[string]string
func (*NacosClient) Get ¶
func (client *NacosClient) Get(kind, key string) string
func (*NacosClient) MonitorChange ¶
func (client *NacosClient) MonitorChange(kind, key string, fn ConfigChangeCallback)
func (*NacosClient) Name ¶
func (client *NacosClient) Name() string
Click to show internal directories.
Click to hide internal directories.