Documentation ¶
Index ¶
- Constants
- func ClearUserStatus(broker string)
- func CreateBrokerClient(broker string) (pb.BrokerClient, error)
- func RandStringBytes(n int) string
- func SendPartnerMsg(msgId, senderId, receiverId, sessionId uint64, content string)
- type BrokerChecker
- type LogicGrpcWorker
- type LogicServer
- func (s *LogicServer) CreateAccount(ctx context.Context, req *pb.CreateAccountRequest) (*pb.CreateAccountResponse, error)
- func (s *LogicServer) Logout(ctx context.Context, req *pb.LogoutRequest) (*pb.LogoutResponse, error)
- func (s *LogicServer) Match(ctx context.Context, req *pb.MatchRequest) (*pb.MatchResponse, error)
- func (s *LogicServer) Reconnect(ctx context.Context, in *pb.ReConnectRequest) (*pb.ReConnectResponse, error)
- func (s *LogicServer) SendMsg(ctx context.Context, req *pb.SendMsgRequest) (*pb.SendMsgResponse, error)
- func (s *LogicServer) ViewedAck(ctx context.Context, req *pb.ViewedAckRequest) (*pb.ViewedAckResponse, error)
- type PumpDialogueLoopWorker
- type PumpSignalLoopWorker
Constants ¶
View Source
const TokenLen = 30
Variables ¶
This section is empty.
Functions ¶
func ClearUserStatus ¶
func ClearUserStatus(broker string)
func CreateBrokerClient ¶
func CreateBrokerClient(broker string) (pb.BrokerClient, error)
func RandStringBytes ¶
func SendPartnerMsg ¶
Types ¶
type BrokerChecker ¶
type BrokerChecker struct { RunningFlag *wm.AtomicBool // 是否运行 true:运行 false:停止 ExitedFlag chan struct{} // 已经退出的标识 ExitChan chan struct{} // contains filtered or unexported fields }
确保broker都在线 如果broker已经掉线,就将与broker连接的用户全部下线
func NewBrokerChecker ¶
func NewBrokerChecker() *BrokerChecker
func (*BrokerChecker) Start ¶
func (worker *BrokerChecker) Start()
func (*BrokerChecker) Stop ¶
func (worker *BrokerChecker) Stop()
type LogicGrpcWorker ¶
type LogicGrpcWorker struct {
// contains filtered or unexported fields
}
func NewLogicGrpcWorker ¶
func NewLogicGrpcWorker() *LogicGrpcWorker
func (*LogicGrpcWorker) Start ¶
func (w *LogicGrpcWorker) Start()
func (*LogicGrpcWorker) Stop ¶
func (w *LogicGrpcWorker) Stop()
type LogicServer ¶
type LogicServer struct{}
func (*LogicServer) CreateAccount ¶
func (s *LogicServer) CreateAccount(ctx context.Context, req *pb.CreateAccountRequest) (*pb.CreateAccountResponse, error)
func (*LogicServer) Logout ¶
func (s *LogicServer) Logout(ctx context.Context, req *pb.LogoutRequest) (*pb.LogoutResponse, error)
func (*LogicServer) Match ¶
func (s *LogicServer) Match(ctx context.Context, req *pb.MatchRequest) (*pb.MatchResponse, error)
func (*LogicServer) Reconnect ¶
func (s *LogicServer) Reconnect(ctx context.Context, in *pb.ReConnectRequest) (*pb.ReConnectResponse, error)
func (*LogicServer) SendMsg ¶
func (s *LogicServer) SendMsg(ctx context.Context, req *pb.SendMsgRequest) (*pb.SendMsgResponse, error)
func (*LogicServer) ViewedAck ¶
func (s *LogicServer) ViewedAck(ctx context.Context, req *pb.ViewedAckRequest) (*pb.ViewedAckResponse, error)
type PumpDialogueLoopWorker ¶
type PumpDialogueLoopWorker struct { //RunningFlag bool // is running? true:running false:stoped ExitedFlag chan struct{} ExitChan chan struct{} // contains filtered or unexported fields }
func NewPumpDialogueLoopWorker ¶
func NewPumpDialogueLoopWorker(minCount, maxCount int) *PumpDialogueLoopWorker
func (*PumpDialogueLoopWorker) PumpDialogueLoop ¶
func (w *PumpDialogueLoopWorker) PumpDialogueLoop()
func (*PumpDialogueLoopWorker) Start ¶
func (w *PumpDialogueLoopWorker) Start()
func (*PumpDialogueLoopWorker) Stop ¶
func (w *PumpDialogueLoopWorker) Stop()
type PumpSignalLoopWorker ¶
type PumpSignalLoopWorker struct { RunningFlag *wm.AtomicBool // is running? true:running false:stoped ExitedFlag chan struct{} // 已经退出的标识 ExitChan chan struct{} }
func NewPumpSignalLoopWorker ¶
func NewPumpSignalLoopWorker() *PumpSignalLoopWorker
func (*PumpSignalLoopWorker) PumpSignalLoop ¶
func (w *PumpSignalLoopWorker) PumpSignalLoop()
func (*PumpSignalLoopWorker) Start ¶
func (w *PumpSignalLoopWorker) Start()
func (*PumpSignalLoopWorker) Stop ¶
func (w *PumpSignalLoopWorker) Stop()
Click to show internal directories.
Click to hide internal directories.