nacos

package
v0.0.0-...-780cc0d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig constant.ClientConfig

type Nacos

type Nacos struct {
	ClientConfig     ClientConfig
	ServerConfigs    []ServerConfig
	RegisterInstance RegisterInstance // 已注册服务的配置
	NamingClient     naming_client.INamingClient
	ConfigClient     config_client.IConfigClient
}

func NewNacos

func NewNacos(s []ServerConfig, c ClientConfig) (*Nacos, error)

NewNacos 实例化nacos

func (Nacos) Deregister

func (n Nacos) Deregister(serverName string) (bool, error)

Deregister 服务注销

func (Nacos) GetOneServer

func (n Nacos) GetOneServer(serverName string) (ip string, port uint64, err error)

GetOneServer 获取有效的服务信息

func (Nacos) Register

func (n Nacos) Register(c RegisterConfig) (bool, error)

Register 服务注册

type RegisterConfig

type RegisterConfig vo.RegisterInstanceParam

type RegisterInstance

type RegisterInstance map[string]vo.RegisterInstanceParam

type ServerConfig

type ServerConfig constant.ServerConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL