Documentation ¶
Index ¶
- Constants
- type Client
- type Config
- func (c *Config) CreateService(svcName string, metadata *Metadata) error
- func (c *Config) DeleteInstance(port, svcName string) error
- func (c *Config) Generate() interface{}
- func (c *Config) GetConfig() ([]byte, error)
- func (c *Config) GetService(svcName string) (*Service, error)
- func (c *Config) GetServiceEndPort(svcName string) string
- func (c *Config) InstanceBeat(svcName string) error
- func (c *Config) NewClient() *Client
- func (c *Config) RegisterInstance(port, svcName string) error
- type ConfigInfo
- type Metadata
- type Service
- type Type
Constants ¶
View Source
const ( GetConfigUrl = "http://%s/nacos/v1/cs/configs?tenant=%s&group=%s&dataId=%s" GetConfigAllInfoUrl = "http://%s/nacos/v1/cs/configs?show=all&tenant=%s&group=%s&dataId=%s" ListenerUrl = "http://%s/nacos/v1/cs/configs/listener" InitParam = "Listening-Configs=%s" + string(rune(2)) + "%s" + string(rune(2)) + "%s" + string(rune(2)) + "%s" + string(rune(1)) )
View Source
const ( CreateServiceUrl = "http://%s/nacos/v1/ns/service" CreateServiceParam = "serviceName=%s&groupName=%s&namespaceId=%s&protectThreshold=0&metadata=%s" GetServiceUrl = "http://%s/nacos/v1/ns/service?serviceName=%s&groupName=%s&namespaceId=%s&protectThreshold=0" GetServiceListUrl = "http://%s/nacos/v1/ns/service/list?pageNo=%s&pageSize=%s&serviceName=%s&groupName=%s&namespaceId=%s" RegisterInstanceUrl = "http://%s/nacos/v1/ns/instance" RegisterInstanceParam = "port=%s&ip=%s&serviceName=%s&groupName=%s&namespaceId=%s" BeatParam = "serviceName=%s&groupName=%s&beat=%s" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Addr string `json:"addr"` Tenant string `json:"tenant"` Group string `json:"group"` DataId string `json:"dataId"` Watch bool }
func (*Config) CreateService ¶
func (*Config) DeleteInstance ¶
func (*Config) GetServiceEndPort ¶
func (*Config) InstanceBeat ¶
func (*Config) RegisterInstance ¶
type ConfigInfo ¶
type ConfigInfo struct { ID int64 `json:"id"` AppName string `json:"appName"` Content string `json:"content"` CreateIp string `json:"createIp"` CreateTime int64 `json:"createTime"` DataId string `json:"dataId"` Desc string `json:"desc"` Effect string `json:"effect"` Group string `json:"group"` MD5 string `json:"md5"` ModifyTime int64 `json:"modifyTime"` Type string `json:"type"` }
Click to show internal directories.
Click to hide internal directories.