Documentation ¶
Index ¶
- type Cluster
- func (c *Cluster) AddCluster(info *common.ClusterInfo)
- func (c *Cluster) BindPacket(packet IClusterPacket)
- func (c *Cluster) BindPacketFunc(callfunc network.PacketFunc)
- func (c *Cluster) Cluster_Add(ctx context.Context, info *common.ClusterInfo)
- func (c *Cluster) Cluster_Del(ctx context.Context, info *common.ClusterInfo)
- func (c *Cluster) DISCONNECT(ctx context.Context, ClusterId uint32)
- func (c *Cluster) DelCluster(info *common.ClusterInfo)
- func (c *Cluster) GetCluster(head rpc.RpcHead) *ClusterNode
- func (c *Cluster) InitCluster(info *common.ClusterInfo, Endpoints []string)
- func (c *Cluster) RandomCluster(head rpc.RpcHead) rpc.RpcHead
- func (c *Cluster) Send(head rpc.RpcHead, packet rpc.Packet)
- func (c *Cluster) SendMsg(head rpc.RpcHead, funcName string, params ...interface{})
- type ClusterNode
- type ClusterServer
- func (c *ClusterServer) AddCluster(info *common.ClusterInfo)
- func (c *ClusterServer) BindServer(pService *network.ServerSocket)
- func (c *ClusterServer) COMMON_RegisterRequest(ctx context.Context, info *common.ClusterInfo)
- func (c *ClusterServer) DISCONNECT(ctx context.Context, socketId uint32)
- func (c *ClusterServer) DelCluster(info *common.ClusterInfo)
- func (c *ClusterServer) GetCluster(head rpc.RpcHead) *common.ClusterInfo
- func (c *ClusterServer) GetClusterBySocket(socketId uint32) *common.ClusterInfo
- func (c *ClusterServer) InitService(info *common.ClusterInfo, Endpoints []string)
- func (c *ClusterServer) RandomCluster(head rpc.RpcHead) rpc.RpcHead
- func (c *ClusterServer) RegisterClusterCall()
- func (c *ClusterServer) Send(head rpc.RpcHead, packet rpc.Packet)
- func (c *ClusterServer) SendMsg(head rpc.RpcHead, funcName string, params ...interface{})
- type HashClusterMap
- type HashClusterSocketMap
- type ICluster
- type IClusterPacket
- type IClusterServer
- type MailBox
- type Master
- type Service
- type Snowflake
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
集群客户端
func (*Cluster) AddCluster ¶
func (c *Cluster) AddCluster(info *common.ClusterInfo)
func (*Cluster) BindPacket ¶
func (c *Cluster) BindPacket(packet IClusterPacket)
func (*Cluster) BindPacketFunc ¶
func (c *Cluster) BindPacketFunc(callfunc network.PacketFunc)
func (*Cluster) Cluster_Add ¶
func (c *Cluster) Cluster_Add(ctx context.Context, info *common.ClusterInfo)
集群新加member
func (*Cluster) Cluster_Del ¶
func (c *Cluster) Cluster_Del(ctx context.Context, info *common.ClusterInfo)
集群删除member
func (*Cluster) DISCONNECT ¶
链接断开
func (*Cluster) DelCluster ¶
func (c *Cluster) DelCluster(info *common.ClusterInfo)
func (*Cluster) GetCluster ¶
func (c *Cluster) GetCluster(head rpc.RpcHead) *ClusterNode
func (*Cluster) InitCluster ¶
func (c *Cluster) InitCluster(info *common.ClusterInfo, Endpoints []string)
type ClusterNode ¶
type ClusterNode struct { *network.ClientSocket *common.ClusterInfo }
type ClusterServer ¶
集群服务器
func (*ClusterServer) AddCluster ¶
func (c *ClusterServer) AddCluster(info *common.ClusterInfo)
func (*ClusterServer) BindServer ¶
func (c *ClusterServer) BindServer(pService *network.ServerSocket)
func (*ClusterServer) COMMON_RegisterRequest ¶
func (c *ClusterServer) COMMON_RegisterRequest(ctx context.Context, info *common.ClusterInfo)
func (*ClusterServer) DISCONNECT ¶
func (c *ClusterServer) DISCONNECT(ctx context.Context, socketId uint32)
链接断开
func (*ClusterServer) DelCluster ¶
func (c *ClusterServer) DelCluster(info *common.ClusterInfo)
func (*ClusterServer) GetCluster ¶
func (c *ClusterServer) GetCluster(head rpc.RpcHead) *common.ClusterInfo
func (*ClusterServer) GetClusterBySocket ¶
func (c *ClusterServer) GetClusterBySocket(socketId uint32) *common.ClusterInfo
func (*ClusterServer) InitService ¶
func (c *ClusterServer) InitService(info *common.ClusterInfo, Endpoints []string)
func (*ClusterServer) RandomCluster ¶
func (c *ClusterServer) RandomCluster(head rpc.RpcHead) rpc.RpcHead
func (*ClusterServer) RegisterClusterCall ¶
func (c *ClusterServer) RegisterClusterCall()
type HashClusterMap ¶
type HashClusterMap map[uint32]*common.ClusterInfo
type HashClusterSocketMap ¶
type HashClusterSocketMap map[uint32]*common.ClusterInfo
type ICluster ¶
type ICluster interface { actor.IActor InitCluster(info *common.ClusterInfo, Endpoints []string) AddCluster(info *common.ClusterInfo) DelCluster(info *common.ClusterInfo) GetCluster(rpc.RpcHead) *ClusterNode BindPacket(IClusterPacket) BindPacketFunc(network.PacketFunc) RandomCluster(head rpc.RpcHead) rpc.RpcHead ///随机分配 // contains filtered or unexported methods }
type IClusterServer ¶
type IClusterServer interface { InitService(info *common.ClusterInfo, Endpoints []string) RegisterClusterCall() //注册集群通用回调 AddCluster(info *common.ClusterInfo) DelCluster(info *common.ClusterInfo) GetCluster(rpc.RpcHead) *common.ClusterInfo GetClusterBySocket(uint32) *common.ClusterInfo BindServer(*network.ServerSocket) SendMsg(rpc.RpcHead, string, ...interface{}) //发送给集群特定服务器 Send(rpc.RpcHead, []byte) //发送给集群特定服务器 RandomCluster(head rpc.RpcHead) rpc.RpcHead //随机分配 // contains filtered or unexported methods }
Click to show internal directories.
Click to hide internal directories.