Documentation ¶
Index ¶
- type RegistrarCenter
- func (own *RegistrarCenter) BroadcastAll(cid string, cmd protocol.Command, data any)
- func (own *RegistrarCenter) BroadcastAndCloseListener()
- func (own *RegistrarCenter) BroadcastGateways(cid string, cmd protocol.Command, data any)
- func (own *RegistrarCenter) BroadcastInstances(cid string, cmd protocol.Command, data any)
- func (own *RegistrarCenter) BroadcastRegistrars(cid string, cmd protocol.Command, data any)
- func (own *RegistrarCenter) DeleteConn(conn connection.Conn)
- func (own *RegistrarCenter) DeleteConnData(conn connection.Conn)
- func (own *RegistrarCenter) RegisterToRegistrar(node string, pwd string)
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)
Click to show internal directories.
Click to hide internal directories.