grpc

package
v0.0.0-...-7d768d8 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c *conf.RPCServer, s *comet.Server) *grpc.Server

New comet grpc Server.

Types

type CometGrpcServer

type CometGrpcServer = Server

type Server

type Server struct {
	// contains filtered or unexported fields
}

func (*Server) Broadcast

func (s *Server) Broadcast(ctx context.Context, req *pb.BroadcastReq) (*pb.BroadcastReply, error)

Broadcast broadcast msg to all user.

func (*Server) BroadcastRoom

func (s *Server) BroadcastRoom(ctx context.Context, req *pb.BroadcastRoomReq) (*pb.BroadcastRoomReply, error)

BroadcastRoom broadcast msg to specified room.

func (*Server) Close

func (s *Server) Close(ctx context.Context, req *pb.Empty) (*pb.Empty, error)

Close Service

func (*Server) Ping

func (s *Server) Ping(ctx context.Context, req *pb.Empty) (*pb.Empty, error)

Ping Service

func (*Server) PushMsg

func (s *Server) PushMsg(ctx context.Context, req *pb.PushMsgReq) (reply *pb.PushMsgReply, err error)

PushMsg push a message to specified sub keys.

func (*Server) Rooms

func (s *Server) Rooms(ctx context.Context, req *pb.RoomsReq) (*pb.RoomsReply, error)

Rooms gets all the room ids for the Server.

Jump to

Keyboard shortcuts

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