client

package
v0.0.0-...-edd3e93 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegistrarCenter

type RegistrarCenter struct {
	*listener.Listener

	GatewayConns   map[string]*connection.RegistrarConn // 网关平台连接
	InstanceConns  map[string]*connection.RegistrarConn // 应用实例连接
	RegistrarConns map[string]*connection.RegistrarConn // 注册中心连接

	Dataset *model.Registrar // 数据中心
	// contains filtered or unexported fields
}

func NewRegistrarCenter

func NewRegistrarCenter(host string) *RegistrarCenter

func (*RegistrarCenter) BroadcastAll

func (own *RegistrarCenter) BroadcastAll(cid string, cmd protocol.Command, data any)

BroadcastAll 广播到所有连接

func (*RegistrarCenter) BroadcastAndCloseListener

func (own *RegistrarCenter) BroadcastAndCloseListener()

BroadcastAndCloseListener 广播并关闭当前 Listener

func (*RegistrarCenter) BroadcastGateways

func (own *RegistrarCenter) BroadcastGateways(cid string, cmd protocol.Command, data any)

BroadcastGateways 广播到所有网关平台

func (*RegistrarCenter) BroadcastInstances

func (own *RegistrarCenter) BroadcastInstances(cid string, cmd protocol.Command, data any)

BroadcastInstances 广播到所有应用实例

func (*RegistrarCenter) BroadcastRegistrars

func (own *RegistrarCenter) BroadcastRegistrars(cid string, cmd protocol.Command, data any)

BroadcastRegistrars 广播到所有注册中心

func (*RegistrarCenter) DeleteConn

func (own *RegistrarCenter) DeleteConn(conn connection.Conn)

deleteConn 删除连接

func (*RegistrarCenter) DeleteConnData

func (own *RegistrarCenter) DeleteConnData(conn connection.Conn)

deleteData 删除数据

func (*RegistrarCenter) RegisterToRegistrar

func (own *RegistrarCenter) RegisterToRegistrar(node string, pwd string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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