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 NacosNameSpaceId ¶
func NacosNameSpaceId() string
NacosNameSpaceId Get Nacos namespace id 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.
Click to show internal directories.
Click to hide internal directories.