Documentation ¶
Index ¶
- func RegisterCometServer(s *grpc.Server, srv CometServer)
- type BroadcastReply
- func (*BroadcastReply) Descriptor() ([]byte, []int)
- func (*BroadcastReply) ProtoMessage()
- func (m *BroadcastReply) Reset()
- func (m *BroadcastReply) String() string
- func (m *BroadcastReply) XXX_DiscardUnknown()
- func (m *BroadcastReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BroadcastReply) XXX_Merge(src proto.Message)
- func (m *BroadcastReply) XXX_Size() int
- func (m *BroadcastReply) XXX_Unmarshal(b []byte) error
- type BroadcastReq
- func (*BroadcastReq) Descriptor() ([]byte, []int)
- func (m *BroadcastReq) GetProto() *protocol.Proto
- func (m *BroadcastReq) GetProtoOp() int32
- func (m *BroadcastReq) GetSpeed() int32
- func (*BroadcastReq) ProtoMessage()
- func (m *BroadcastReq) Reset()
- func (m *BroadcastReq) String() string
- func (m *BroadcastReq) XXX_DiscardUnknown()
- func (m *BroadcastReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BroadcastReq) XXX_Merge(src proto.Message)
- func (m *BroadcastReq) XXX_Size() int
- func (m *BroadcastReq) XXX_Unmarshal(b []byte) error
- type BroadcastRoomReply
- func (*BroadcastRoomReply) Descriptor() ([]byte, []int)
- func (*BroadcastRoomReply) ProtoMessage()
- func (m *BroadcastRoomReply) Reset()
- func (m *BroadcastRoomReply) String() string
- func (m *BroadcastRoomReply) XXX_DiscardUnknown()
- func (m *BroadcastRoomReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BroadcastRoomReply) XXX_Merge(src proto.Message)
- func (m *BroadcastRoomReply) XXX_Size() int
- func (m *BroadcastRoomReply) XXX_Unmarshal(b []byte) error
- type BroadcastRoomReq
- func (*BroadcastRoomReq) Descriptor() ([]byte, []int)
- func (m *BroadcastRoomReq) GetProto() *protocol.Proto
- func (m *BroadcastRoomReq) GetRoomID() string
- func (*BroadcastRoomReq) ProtoMessage()
- func (m *BroadcastRoomReq) Reset()
- func (m *BroadcastRoomReq) String() string
- func (m *BroadcastRoomReq) XXX_DiscardUnknown()
- func (m *BroadcastRoomReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BroadcastRoomReq) XXX_Merge(src proto.Message)
- func (m *BroadcastRoomReq) XXX_Size() int
- func (m *BroadcastRoomReq) XXX_Unmarshal(b []byte) error
- type CometClient
- type CometServer
- type PushMsgReply
- func (*PushMsgReply) Descriptor() ([]byte, []int)
- func (*PushMsgReply) ProtoMessage()
- func (m *PushMsgReply) Reset()
- func (m *PushMsgReply) String() string
- func (m *PushMsgReply) XXX_DiscardUnknown()
- func (m *PushMsgReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PushMsgReply) XXX_Merge(src proto.Message)
- func (m *PushMsgReply) XXX_Size() int
- func (m *PushMsgReply) XXX_Unmarshal(b []byte) error
- type PushMsgReq
- func (*PushMsgReq) Descriptor() ([]byte, []int)
- func (m *PushMsgReq) GetKeys() []string
- func (m *PushMsgReq) GetProto() *protocol.Proto
- func (m *PushMsgReq) GetProtoOp() int32
- func (*PushMsgReq) ProtoMessage()
- func (m *PushMsgReq) Reset()
- func (m *PushMsgReq) String() string
- func (m *PushMsgReq) XXX_DiscardUnknown()
- func (m *PushMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PushMsgReq) XXX_Merge(src proto.Message)
- func (m *PushMsgReq) XXX_Size() int
- func (m *PushMsgReq) XXX_Unmarshal(b []byte) error
- type RoomsReply
- func (*RoomsReply) Descriptor() ([]byte, []int)
- func (m *RoomsReply) GetRooms() map[string]bool
- func (*RoomsReply) ProtoMessage()
- func (m *RoomsReply) Reset()
- func (m *RoomsReply) String() string
- func (m *RoomsReply) XXX_DiscardUnknown()
- func (m *RoomsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RoomsReply) XXX_Merge(src proto.Message)
- func (m *RoomsReply) XXX_Size() int
- func (m *RoomsReply) XXX_Unmarshal(b []byte) error
- type RoomsReq
- func (*RoomsReq) Descriptor() ([]byte, []int)
- func (*RoomsReq) ProtoMessage()
- func (m *RoomsReq) Reset()
- func (m *RoomsReq) String() string
- func (m *RoomsReq) XXX_DiscardUnknown()
- func (m *RoomsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RoomsReq) XXX_Merge(src proto.Message)
- func (m *RoomsReq) XXX_Size() int
- func (m *RoomsReq) XXX_Unmarshal(b []byte) error
- type UnimplementedCometServer
- func (*UnimplementedCometServer) Broadcast(ctx context.Context, req *BroadcastReq) (*BroadcastReply, error)
- func (*UnimplementedCometServer) BroadcastRoom(ctx context.Context, req *BroadcastRoomReq) (*BroadcastRoomReply, error)
- func (*UnimplementedCometServer) PushMsg(ctx context.Context, req *PushMsgReq) (*PushMsgReply, error)
- func (*UnimplementedCometServer) Rooms(ctx context.Context, req *RoomsReq) (*RoomsReply, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCometServer ¶
func RegisterCometServer(s *grpc.Server, srv CometServer)
Types ¶
type BroadcastReply ¶
type BroadcastReply struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BroadcastReply) Descriptor ¶
func (*BroadcastReply) Descriptor() ([]byte, []int)
func (*BroadcastReply) ProtoMessage ¶
func (*BroadcastReply) ProtoMessage()
func (*BroadcastReply) Reset ¶
func (m *BroadcastReply) Reset()
func (*BroadcastReply) String ¶
func (m *BroadcastReply) String() string
func (*BroadcastReply) XXX_DiscardUnknown ¶
func (m *BroadcastReply) XXX_DiscardUnknown()
func (*BroadcastReply) XXX_Marshal ¶
func (m *BroadcastReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BroadcastReply) XXX_Merge ¶
func (m *BroadcastReply) XXX_Merge(src proto.Message)
func (*BroadcastReply) XXX_Size ¶
func (m *BroadcastReply) XXX_Size() int
func (*BroadcastReply) XXX_Unmarshal ¶
func (m *BroadcastReply) XXX_Unmarshal(b []byte) error
type BroadcastReq ¶
type BroadcastReq struct { ProtoOp int32 `protobuf:"varint,1,opt,name=protoOp,proto3" json:"protoOp,omitempty"` Proto *protocol.Proto `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"` Speed int32 `protobuf:"varint,3,opt,name=speed,proto3" json:"speed,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BroadcastReq) Descriptor ¶
func (*BroadcastReq) Descriptor() ([]byte, []int)
func (*BroadcastReq) GetProto ¶
func (m *BroadcastReq) GetProto() *protocol.Proto
func (*BroadcastReq) GetProtoOp ¶
func (m *BroadcastReq) GetProtoOp() int32
func (*BroadcastReq) GetSpeed ¶
func (m *BroadcastReq) GetSpeed() int32
func (*BroadcastReq) ProtoMessage ¶
func (*BroadcastReq) ProtoMessage()
func (*BroadcastReq) Reset ¶
func (m *BroadcastReq) Reset()
func (*BroadcastReq) String ¶
func (m *BroadcastReq) String() string
func (*BroadcastReq) XXX_DiscardUnknown ¶
func (m *BroadcastReq) XXX_DiscardUnknown()
func (*BroadcastReq) XXX_Marshal ¶
func (m *BroadcastReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BroadcastReq) XXX_Merge ¶
func (m *BroadcastReq) XXX_Merge(src proto.Message)
func (*BroadcastReq) XXX_Size ¶
func (m *BroadcastReq) XXX_Size() int
func (*BroadcastReq) XXX_Unmarshal ¶
func (m *BroadcastReq) XXX_Unmarshal(b []byte) error
type BroadcastRoomReply ¶
type BroadcastRoomReply struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BroadcastRoomReply) Descriptor ¶
func (*BroadcastRoomReply) Descriptor() ([]byte, []int)
func (*BroadcastRoomReply) ProtoMessage ¶
func (*BroadcastRoomReply) ProtoMessage()
func (*BroadcastRoomReply) Reset ¶
func (m *BroadcastRoomReply) Reset()
func (*BroadcastRoomReply) String ¶
func (m *BroadcastRoomReply) String() string
func (*BroadcastRoomReply) XXX_DiscardUnknown ¶
func (m *BroadcastRoomReply) XXX_DiscardUnknown()
func (*BroadcastRoomReply) XXX_Marshal ¶
func (m *BroadcastRoomReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BroadcastRoomReply) XXX_Merge ¶
func (m *BroadcastRoomReply) XXX_Merge(src proto.Message)
func (*BroadcastRoomReply) XXX_Size ¶
func (m *BroadcastRoomReply) XXX_Size() int
func (*BroadcastRoomReply) XXX_Unmarshal ¶
func (m *BroadcastRoomReply) XXX_Unmarshal(b []byte) error
type BroadcastRoomReq ¶
type BroadcastRoomReq struct { RoomID string `protobuf:"bytes,1,opt,name=roomID,proto3" json:"roomID,omitempty"` Proto *protocol.Proto `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BroadcastRoomReq) Descriptor ¶
func (*BroadcastRoomReq) Descriptor() ([]byte, []int)
func (*BroadcastRoomReq) GetProto ¶
func (m *BroadcastRoomReq) GetProto() *protocol.Proto
func (*BroadcastRoomReq) GetRoomID ¶
func (m *BroadcastRoomReq) GetRoomID() string
func (*BroadcastRoomReq) ProtoMessage ¶
func (*BroadcastRoomReq) ProtoMessage()
func (*BroadcastRoomReq) Reset ¶
func (m *BroadcastRoomReq) Reset()
func (*BroadcastRoomReq) String ¶
func (m *BroadcastRoomReq) String() string
func (*BroadcastRoomReq) XXX_DiscardUnknown ¶
func (m *BroadcastRoomReq) XXX_DiscardUnknown()
func (*BroadcastRoomReq) XXX_Marshal ¶
func (m *BroadcastRoomReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BroadcastRoomReq) XXX_Merge ¶
func (m *BroadcastRoomReq) XXX_Merge(src proto.Message)
func (*BroadcastRoomReq) XXX_Size ¶
func (m *BroadcastRoomReq) XXX_Size() int
func (*BroadcastRoomReq) XXX_Unmarshal ¶
func (m *BroadcastRoomReq) XXX_Unmarshal(b []byte) error
type CometClient ¶
type CometClient interface { // PushMsg push by key or mid PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgReply, error) // Broadcast send to every enrity Broadcast(ctx context.Context, in *BroadcastReq, opts ...grpc.CallOption) (*BroadcastReply, error) // BroadcastRoom broadcast to one room BroadcastRoom(ctx context.Context, in *BroadcastRoomReq, opts ...grpc.CallOption) (*BroadcastRoomReply, error) // Rooms get all rooms Rooms(ctx context.Context, in *RoomsReq, opts ...grpc.CallOption) (*RoomsReply, error) }
CometClient is the client API for Comet service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCometClient ¶
func NewCometClient(cc *grpc.ClientConn) CometClient
type CometServer ¶
type CometServer interface { // PushMsg push by key or mid PushMsg(context.Context, *PushMsgReq) (*PushMsgReply, error) // Broadcast send to every enrity Broadcast(context.Context, *BroadcastReq) (*BroadcastReply, error) // BroadcastRoom broadcast to one room BroadcastRoom(context.Context, *BroadcastRoomReq) (*BroadcastRoomReply, error) // Rooms get all rooms Rooms(context.Context, *RoomsReq) (*RoomsReply, error) }
CometServer is the server API for Comet service.
type PushMsgReply ¶
type PushMsgReply struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PushMsgReply) Descriptor ¶
func (*PushMsgReply) Descriptor() ([]byte, []int)
func (*PushMsgReply) ProtoMessage ¶
func (*PushMsgReply) ProtoMessage()
func (*PushMsgReply) Reset ¶
func (m *PushMsgReply) Reset()
func (*PushMsgReply) String ¶
func (m *PushMsgReply) String() string
func (*PushMsgReply) XXX_DiscardUnknown ¶
func (m *PushMsgReply) XXX_DiscardUnknown()
func (*PushMsgReply) XXX_Marshal ¶
func (m *PushMsgReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PushMsgReply) XXX_Merge ¶
func (m *PushMsgReply) XXX_Merge(src proto.Message)
func (*PushMsgReply) XXX_Size ¶
func (m *PushMsgReply) XXX_Size() int
func (*PushMsgReply) XXX_Unmarshal ¶
func (m *PushMsgReply) XXX_Unmarshal(b []byte) error
type PushMsgReq ¶
type PushMsgReq struct { Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` ProtoOp int32 `protobuf:"varint,3,opt,name=protoOp,proto3" json:"protoOp,omitempty"` Proto *protocol.Proto `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PushMsgReq) Descriptor ¶
func (*PushMsgReq) Descriptor() ([]byte, []int)
func (*PushMsgReq) GetKeys ¶
func (m *PushMsgReq) GetKeys() []string
func (*PushMsgReq) GetProto ¶
func (m *PushMsgReq) GetProto() *protocol.Proto
func (*PushMsgReq) GetProtoOp ¶
func (m *PushMsgReq) GetProtoOp() int32
func (*PushMsgReq) ProtoMessage ¶
func (*PushMsgReq) ProtoMessage()
func (*PushMsgReq) Reset ¶
func (m *PushMsgReq) Reset()
func (*PushMsgReq) String ¶
func (m *PushMsgReq) String() string
func (*PushMsgReq) XXX_DiscardUnknown ¶
func (m *PushMsgReq) XXX_DiscardUnknown()
func (*PushMsgReq) XXX_Marshal ¶
func (m *PushMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PushMsgReq) XXX_Merge ¶
func (m *PushMsgReq) XXX_Merge(src proto.Message)
func (*PushMsgReq) XXX_Size ¶
func (m *PushMsgReq) XXX_Size() int
func (*PushMsgReq) XXX_Unmarshal ¶
func (m *PushMsgReq) XXX_Unmarshal(b []byte) error
type RoomsReply ¶
type RoomsReply struct { Rooms map[string]bool `` /* 152-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RoomsReply) Descriptor ¶
func (*RoomsReply) Descriptor() ([]byte, []int)
func (*RoomsReply) GetRooms ¶
func (m *RoomsReply) GetRooms() map[string]bool
func (*RoomsReply) ProtoMessage ¶
func (*RoomsReply) ProtoMessage()
func (*RoomsReply) Reset ¶
func (m *RoomsReply) Reset()
func (*RoomsReply) String ¶
func (m *RoomsReply) String() string
func (*RoomsReply) XXX_DiscardUnknown ¶
func (m *RoomsReply) XXX_DiscardUnknown()
func (*RoomsReply) XXX_Marshal ¶
func (m *RoomsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RoomsReply) XXX_Merge ¶
func (m *RoomsReply) XXX_Merge(src proto.Message)
func (*RoomsReply) XXX_Size ¶
func (m *RoomsReply) XXX_Size() int
func (*RoomsReply) XXX_Unmarshal ¶
func (m *RoomsReply) XXX_Unmarshal(b []byte) error
type RoomsReq ¶
type RoomsReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RoomsReq) Descriptor ¶
func (*RoomsReq) ProtoMessage ¶
func (*RoomsReq) ProtoMessage()
func (*RoomsReq) XXX_DiscardUnknown ¶
func (m *RoomsReq) XXX_DiscardUnknown()
func (*RoomsReq) XXX_Marshal ¶
func (*RoomsReq) XXX_Unmarshal ¶
type UnimplementedCometServer ¶
type UnimplementedCometServer struct { }
UnimplementedCometServer can be embedded to have forward compatible implementations.
func (*UnimplementedCometServer) Broadcast ¶
func (*UnimplementedCometServer) Broadcast(ctx context.Context, req *BroadcastReq) (*BroadcastReply, error)
func (*UnimplementedCometServer) BroadcastRoom ¶
func (*UnimplementedCometServer) BroadcastRoom(ctx context.Context, req *BroadcastRoomReq) (*BroadcastRoomReply, error)
func (*UnimplementedCometServer) PushMsg ¶
func (*UnimplementedCometServer) PushMsg(ctx context.Context, req *PushMsgReq) (*PushMsgReply, error)
func (*UnimplementedCometServer) Rooms ¶
func (*UnimplementedCometServer) Rooms(ctx context.Context, req *RoomsReq) (*RoomsReply, error)
Click to show internal directories.
Click to hide internal directories.