xnacos_client

package
v1.0.1-0...-e52dcc8 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNacosClientConfig

func NewNacosClientConfig(config *registry.RegistryConfig) constant.ClientConfig

* TimeoutMs uint64 //timeout for requesting Nacos server, default value is 10000ms ListenInterval uint64 //Deprecated BeatInterval int64 //the time interval for sending beat to server,default value is 5000ms NamespaceId string //the namespaceId of Nacos Endpoint string //the endpoint for get Nacos server addresses RegionId string //the regionId for kms AccessKey string //the AccessKey for kms SecretKey string //the SecretKey for kms OpenKMS bool //it's to open kms,default is false. https://help.aliyun.com/product/28933.html CacheDir string //the directory for persist nacos service info,default value is current path UpdateThreadNum int //the number of gorutine for update nacos service info,default value is 20 NotLoadCacheAtStart bool //not to load persistent nacos service info in CacheDir at start time UpdateCacheWhenEmpty bool //update cache when get empty service instance from server Username string //the username for nacos auth Password string //the password for nacos auth LogDir string //the directory for log, default is current path RotateTime string //the rotate time for log, eg: 30m, 1h, 24h, default is 24h MaxAge int64 //the max age of a log file, default value is 3 LogLevel

NewNacosClientConfig 创建一个默认的client配置

Types

type NacosClient

type NacosClient struct {
	// contains filtered or unexported fields
}

*

*
* Copyright (C) @2020 hugo network Co. Ltd
* @description
* @updateRemark
* @author               hugo
* @updateUser
* @createDate           2020/8/27 3:33 下午
* @updateDate           2020/8/27 3:33 下午
* @version              1.0

* nacos客户端

func NewNacosClient

func NewNacosClient(client constant.ClientConfig, server []constant.ServerConfig) (*NacosClient, error)

创建nacosclient

func (*NacosClient) GetNamingClient

func (client *NacosClient) GetNamingClient() naming_client.INamingClient

获取INamingClient

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳