serverplugin

package
v1.3.21 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 constant2.ClientConfig
	// nacos server config
	ServerConfig []constant2.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)

Jump to

Keyboard shortcuts

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