Documentation
¶
Index ¶
- type ClientConfig
- type Nacos
- func (n Nacos) Deregister(serverName string) (bool, error)
- func (n Nacos) GetConfig(id, group string) (string, error)
- func (n Nacos) GetOneServer(serverName string) (ip string, port uint64, err error)
- func (n Nacos) Listen(id, group string, callbackFunc func(data string) error) error
- func (n Nacos) Register(c RegisterConfig) (bool, error)
- type RegisterConfig
- type RegisterInstance
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type ClientConfig struct {
NamespaceId string `json:"namespaceId" mapstructure:"namespaceId"`
TimeoutMs uint64 `json:"timeoutMs" mapstructure:"timeoutMs"`
NotLoadCacheAtStart bool `json:"notLoadCacheAtStart" mapstructure:"notLoadCacheAtStart"`
LogDir string `json:"logDir" mapstructure:"logDir"`
CacheDir string `json:"cacheDir" mapstructure:"cacheDir"`
LogLevel string `json:"logLevel" mapstructure:"logLevel"`
}
type Nacos ¶
type Nacos struct {
ClientConfig ClientConfig
ServerConfigs []ServerConfig
RegisterInstance RegisterInstance // 已注册服务的配置
NamingClient naming_client.INamingClient
ConfigClient config_client.IConfigClient
}
func (Nacos) Deregister ¶
Deregister 服务注销
func (Nacos) GetOneServer ¶
GetOneServer 获取有效的服务信息
type RegisterConfig ¶
type RegisterConfig vo.RegisterInstanceParam
type RegisterInstance ¶
type RegisterInstance map[string]vo.RegisterInstanceParam
Click to show internal directories.
Click to hide internal directories.