Documentation ¶
Index ¶
- type Cluster
- func (c *Cluster) AddCluster(info *rpc.ClusterInfo)
- func (c *Cluster) BindPacket(packet IClusterPacket)
- func (c *Cluster) BindPacketFunc(callfunc network.PacketFunc)
- func (c *Cluster) Cluster_Add(ctx context.Context, info *rpc.ClusterInfo)
- func (c *Cluster) Cluster_Del(ctx context.Context, info *rpc.ClusterInfo)
- func (c *Cluster) DISCONNECT(ctx context.Context, ClusterId uint32)
- func (c *Cluster) DelCluster(info *rpc.ClusterInfo)
- func (c *Cluster) GetCluster(head rpc.RpcHead) *ClusterNode
- func (c *Cluster) InitCluster(info *rpc.ClusterInfo, Endpoints []string)
- type ClusterNode
- type ClusterServer
- func (this *ClusterServer) AddCluster(info *rpc.ClusterInfo)
- func (this *ClusterServer) BindServer(pService *network.ServerSocket)
- func (this *ClusterServer) DelCluster(info *rpc.ClusterInfo)
- func (this *ClusterServer) GetCluster(head rpc.RpcHead) *rpc.ClusterInfo
- func (this *ClusterServer) GetClusterBySocket(socketId uint32) *rpc.ClusterInfo
- func (this *ClusterServer) InitService(info *rpc.ClusterInfo, Endpoints []string)
- func (this *ClusterServer) RandomCluster(head rpc.RpcHead) rpc.RpcHead
- func (this *ClusterServer) RegisterClusterCall()
- func (this *ClusterServer) Send(head rpc.RpcHead, buff []byte)
- func (this *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 *rpc.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 *rpc.ClusterInfo)
集群新加member
func (*Cluster) Cluster_Del ¶
func (c *Cluster) Cluster_Del(ctx context.Context, info *rpc.ClusterInfo)
集群删除member
func (*Cluster) DISCONNECT ¶
链接断开
func (*Cluster) DelCluster ¶
func (c *Cluster) DelCluster(info *rpc.ClusterInfo)
func (*Cluster) GetCluster ¶
func (c *Cluster) GetCluster(head rpc.RpcHead) *ClusterNode
func (*Cluster) InitCluster ¶
func (c *Cluster) InitCluster(info *rpc.ClusterInfo, Endpoints []string)
type ClusterNode ¶
type ClusterNode struct { *network.ClientSocket *rpc.ClusterInfo }
type ClusterServer ¶
集群服务器
func (*ClusterServer) AddCluster ¶
func (this *ClusterServer) AddCluster(info *rpc.ClusterInfo)
func (*ClusterServer) BindServer ¶
func (this *ClusterServer) BindServer(pService *network.ServerSocket)
func (*ClusterServer) DelCluster ¶
func (this *ClusterServer) DelCluster(info *rpc.ClusterInfo)
func (*ClusterServer) GetCluster ¶
func (this *ClusterServer) GetCluster(head rpc.RpcHead) *rpc.ClusterInfo
func (*ClusterServer) GetClusterBySocket ¶
func (this *ClusterServer) GetClusterBySocket(socketId uint32) *rpc.ClusterInfo
func (*ClusterServer) InitService ¶
func (this *ClusterServer) InitService(info *rpc.ClusterInfo, Endpoints []string)
func (*ClusterServer) RandomCluster ¶
func (this *ClusterServer) RandomCluster(head rpc.RpcHead) rpc.RpcHead
func (*ClusterServer) RegisterClusterCall ¶
func (this *ClusterServer) RegisterClusterCall()
type HashClusterMap ¶
type HashClusterMap map[uint32]*rpc.ClusterInfo
type HashClusterSocketMap ¶
type HashClusterSocketMap map[uint32]*rpc.ClusterInfo
type ICluster ¶
type ICluster interface { actor.IActor InitCluster(info *rpc.ClusterInfo, Endpoints []string) AddCluster(info *rpc.ClusterInfo) DelCluster(info *rpc.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 *rpc.ClusterInfo, Endpoints []string) RegisterClusterCall() //注册集群通用回调 AddCluster(info *rpc.ClusterInfo) DelCluster(info *rpc.ClusterInfo) GetCluster(rpc.RpcHead) *rpc.ClusterInfo GetClusterBySocket(uint32) *rpc.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.