nacos

package
v2.0.0-...-829d287 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NACOS_ENV_SERVER_ADDR     = "serverAddr"
	NACOS_ENV_PORT            = "serverPort"
	NACOS_ENV_TAGS            = "KITEX_NACOS_ENV_TAGS"
	NACOS_ENV_NAMESPACE_ID    = "namespace"
	NACOS_DEFAULT_SERVER_ADDR = "127.0.0.1"
	NACOS_DEFAULT_PORT        = 8848
	NACOS_DEFAULT_REGIONID    = "cn-hangzhou"
)

Variables

View Source
var Tags map[string]string

Tags providers the default tags to inject nacos.

Functions

func NacosAddr

func NacosAddr() string

NacosAddr Get Nacos addr from environment variables

func NacosNameSpaceId

func NacosNameSpaceId() string

NacosNameSpaceId Get Nacos namespace id from environment variables

func NacosPort

func NacosPort() int64

NacosPort Get Nacos port from environment variables

func NewDefaultNacosClient

func NewDefaultNacosClient(opts ...Option) (naming_client.INamingClient, error)

NewDefaultNacosClient Create a default Nacos client It can create a client with default config by env variable. See: env.go

Types

type Option

type Option struct {
	F func(o *vo.NacosClientParam)
}

Option is the way to config a client.

Jump to

Keyboard shortcuts

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