Documentation ¶
Index ¶
- type NacosRegisterPlugin
- func (p *NacosRegisterPlugin) Register(name string, rcvr interface{}, metadata string) (err error)
- func (p *NacosRegisterPlugin) RegisterFunction(serviceName, fname string, fn interface{}, metadata string) error
- func (p *NacosRegisterPlugin) Start() error
- func (p *NacosRegisterPlugin) Stop() error
- func (p *NacosRegisterPlugin) Unregister(name string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NacosRegisterPlugin ¶
type NacosRegisterPlugin struct { // service address, for example, tcp@127.0.0.1:8972, quic@127.0.0.1:1234 ServiceAddress string // nacos client config ClientConfig constant.ClientConfig // nacos server config ServerConfig []constant.ServerConfig Cluster string Group string Weight float64 // Registered services Services []string // contains filtered or unexported fields }
NacosRegisterPlugin implements consul registry.
func (*NacosRegisterPlugin) Register ¶
func (p *NacosRegisterPlugin) Register(name string, rcvr interface{}, metadata string) (err error)
Register handles registering event. this service is registered at BASE/serviceName/thisIpAddress node
func (*NacosRegisterPlugin) RegisterFunction ¶
func (p *NacosRegisterPlugin) RegisterFunction(serviceName, fname string, fn interface{}, metadata string) error
func (*NacosRegisterPlugin) Start ¶
func (p *NacosRegisterPlugin) Start() error
Start starts to connect consul cluster
func (*NacosRegisterPlugin) Stop ¶
func (p *NacosRegisterPlugin) Stop() error
Stop unregister all services.
func (*NacosRegisterPlugin) Unregister ¶
func (p *NacosRegisterPlugin) Unregister(name string) (err error)
Click to show internal directories.
Click to hide internal directories.