nacosx

package module
v0.0.0-...-2e3374b Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WorkerID = 0
	// WorkerMax 最大worker id
	WorkerMax   = 4096
	WorkerIDKey = "worker_id"
)

Functions

func SetNacosClient

func SetNacosClient(client *NacosClient)

SetNacosClient set nacos client

Types

type NacosClient

type NacosClient struct {
	vo.NacosClientParam
	config_client.IConfigClient
	// contains filtered or unexported fields
}

func GetNacosClient

func GetNacosClient() *NacosClient

GetNacosClient get nacos client

func NewNacosClient

func NewNacosClient(cc *constant.ClientConfig, sc []constant.ServerConfig) *NacosClient

NewNacosClient new nacos client

func (*NacosClient) Connection

func (n *NacosClient) Connection()

Connection nacos

func (*NacosClient) GetRegistry

func (n *NacosClient) GetRegistry() *nacos.Registry

GetRegistry get registry

func (*NacosClient) GetWorkID

func (n *NacosClient) GetWorkID() (int, error)

GetWorkID 获取worker id

func (*NacosClient) ServerRegistry

func (n *NacosClient) ServerRegistry()

ServerRegistry registry server

Jump to

Keyboard shortcuts

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