Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { TimeoutMs uint64 `mapstructure:"timeoutMs"` // 连接nacos服务器的超时时间,默认10000ms Username string `mapstructure:"username"` Password string `mapstructure:"password"` NamespaceId string `mapstructure:"namespaceId"` DataId string `mapstructure:"dataId"` Group string `mapstructure:"group"` Type string `mapstructure:"type"` // nacos存储配置信息的格式 Tag string `mapstructure:"tag"` Servers []ServerConfig `mapstructure:"servers"` ClusterName string `mapstructure:"clusterName"` CacheDir string `mapstructure:"cacheDir"` // 缓存nacos服务信息的目录,默认当前目录 NotLoadCacheAtStart bool `mapstructure:"notLoadCacheAtStart"` // 应用每次启动时,是否从缓存中加载nacos服务信息,true:不从缓存中加载 LogLevel string `mapstructure:"logLevel"` // debug | info | warn | error,默认:info LogDir string `mapstructure:"logDir"` // 默认当前目录 BeatInterval uint64 `mapstructure:"beatInterval"` // 与nacos服务器保持心跳的时间间隔,默认5000ms ServiceInfo ServiceInfo `mapstructure:"serviceInfo"` // 服务注册 }
type Nacoser ¶
type Nacoser struct {
// contains filtered or unexported fields
}
func CreateNacoser ¶
func (*Nacoser) GetService ¶
func (n *Nacoser) GetService(param vo.GetServiceParam) *model.Service
func (*Nacoser) GetServiceInstance ¶
func (n *Nacoser) GetServiceInstance(param vo.SelectOneHealthInstanceParam) *model.Instance
func (*Nacoser) RegisterService ¶
func (*Nacoser) UnregisterService ¶
func (n *Nacoser) UnregisterService()
type ServerConfig ¶
type ServiceInfo ¶
Click to show internal directories.
Click to hide internal directories.