Documentation ¶
Index ¶
- Variables
- func RegisterBroadcastServer(s *grpc.Server, srv BroadcastServer)
- func RegisterRouterServer(s *grpc.Server, srv RouterServer)
- type BroadcastClient
- type BroadcastServer
- type QueueMsg
- func (*QueueMsg) Descriptor() ([]byte, []int)
- func (m *QueueMsg) GetData() []byte
- func (m *QueueMsg) GetTargets() *Target
- func (m *QueueMsg) Marshal() (dAtA []byte, err error)
- func (m *QueueMsg) MarshalTo(dAtA []byte) (int, error)
- func (m *QueueMsg) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueueMsg) ProtoMessage()
- func (m *QueueMsg) Reset()
- func (m *QueueMsg) Size() (n int)
- func (m *QueueMsg) String() string
- func (m *QueueMsg) Unmarshal(dAtA []byte) error
- func (m *QueueMsg) XXX_DiscardUnknown()
- func (m *QueueMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueueMsg) XXX_Merge(src proto.Message)
- func (m *QueueMsg) XXX_Size() int
- func (m *QueueMsg) XXX_Unmarshal(b []byte) error
- type ReqArg
- func (*ReqArg) Descriptor() ([]byte, []int)
- func (m *ReqArg) GetMsgID() int32
- func (m *ReqArg) GetPayload() []byte
- func (m *ReqArg) GetUid() string
- func (m *ReqArg) Marshal() (dAtA []byte, err error)
- func (m *ReqArg) MarshalTo(dAtA []byte) (int, error)
- func (m *ReqArg) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ReqArg) ProtoMessage()
- func (m *ReqArg) Reset()
- func (m *ReqArg) Size() (n int)
- func (m *ReqArg) String() string
- func (m *ReqArg) Unmarshal(dAtA []byte) error
- func (m *ReqArg) XXX_DiscardUnknown()
- func (m *ReqArg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReqArg) XXX_Merge(src proto.Message)
- func (m *ReqArg) XXX_Size() int
- func (m *ReqArg) XXX_Unmarshal(b []byte) error
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetMsgID() int32
- func (m *Request) GetPayload() []byte
- func (m *Request) GetToken() string
- func (m *Request) Marshal() (dAtA []byte, err error)
- func (m *Request) MarshalTo(dAtA []byte) (int, error)
- func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) Size() (n int)
- func (m *Request) String() string
- func (m *Request) Unmarshal(dAtA []byte) error
- func (m *Request) XXX_DiscardUnknown()
- func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Request) XXX_Merge(src proto.Message)
- func (m *Request) XXX_Size() int
- func (m *Request) XXX_Unmarshal(b []byte) error
- type RespMsg
- func (*RespMsg) Descriptor() ([]byte, []int)
- func (m *RespMsg) GetAppId() string
- func (m *RespMsg) GetCode() int32
- func (m *RespMsg) GetMsgID() int32
- func (m *RespMsg) GetPayload() []byte
- func (m *RespMsg) Marshal() (dAtA []byte, err error)
- func (m *RespMsg) MarshalTo(dAtA []byte) (int, error)
- func (m *RespMsg) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RespMsg) ProtoMessage()
- func (m *RespMsg) Reset()
- func (m *RespMsg) Size() (n int)
- func (m *RespMsg) String() string
- func (m *RespMsg) Unmarshal(dAtA []byte) error
- func (m *RespMsg) XXX_DiscardUnknown()
- func (m *RespMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RespMsg) XXX_Merge(src proto.Message)
- func (m *RespMsg) XXX_Size() int
- func (m *RespMsg) XXX_Unmarshal(b []byte) error
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetCode() int32
- func (m *Response) GetMsgID() int32
- func (m *Response) GetPayload() []byte
- func (m *Response) Marshal() (dAtA []byte, err error)
- func (m *Response) MarshalTo(dAtA []byte) (int, error)
- func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) Size() (n int)
- func (m *Response) String() string
- func (m *Response) Unmarshal(dAtA []byte) error
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
- type RouterClient
- type RouterServer
- type Status
- func (*Status) Descriptor() ([]byte, []int)
- func (m *Status) GetCode() int32
- func (m *Status) GetMsg() string
- func (m *Status) Marshal() (dAtA []byte, err error)
- func (m *Status) MarshalTo(dAtA []byte) (int, error)
- func (m *Status) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Status) ProtoMessage()
- func (m *Status) Reset()
- func (m *Status) Size() (n int)
- func (m *Status) String() string
- func (m *Status) Unmarshal(dAtA []byte) error
- func (m *Status) XXX_DiscardUnknown()
- func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Status) XXX_Merge(src proto.Message)
- func (m *Status) XXX_Size() int
- func (m *Status) XXX_Unmarshal(b []byte) error
- type Target
- func (*Target) Descriptor() ([]byte, []int)
- func (m *Target) GetGroupId() map[string]bool
- func (m *Target) GetUids() map[string]bool
- func (m *Target) GetUnlessUids() map[string]bool
- func (m *Target) Marshal() (dAtA []byte, err error)
- func (m *Target) MarshalTo(dAtA []byte) (int, error)
- func (m *Target) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Target) ProtoMessage()
- func (m *Target) Reset()
- func (m *Target) Size() (n int)
- func (m *Target) String() string
- func (m *Target) Unmarshal(dAtA []byte) error
- func (m *Target) XXX_DiscardUnknown()
- func (m *Target) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Target) XXX_Merge(src proto.Message)
- func (m *Target) XXX_Size() int
- func (m *Target) XXX_Unmarshal(b []byte) error
- type UnimplementedBroadcastServer
- type UnimplementedRouterServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthBroadcast = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBroadcast = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupBroadcast = fmt.Errorf("proto: unexpected end of group") )
Functions ¶
func RegisterBroadcastServer ¶
func RegisterBroadcastServer(s *grpc.Server, srv BroadcastServer)
func RegisterRouterServer ¶
func RegisterRouterServer(s *grpc.Server, srv RouterServer)
Types ¶
type BroadcastClient ¶
type BroadcastClient interface {
Frontend(ctx context.Context, in *QueueMsg, opts ...grpc.CallOption) (*Status, error)
}
BroadcastClient is the client API for Broadcast service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewBroadcastClient ¶
func NewBroadcastClient(cc *grpc.ClientConn) BroadcastClient
type BroadcastServer ¶
BroadcastServer is the server API for Broadcast service.
type QueueMsg ¶
type QueueMsg struct { Data []byte `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"` Targets *Target `protobuf:"bytes,2,opt,name=Targets,proto3" json:"Targets,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*QueueMsg) Descriptor ¶
func (*QueueMsg) GetTargets ¶
func (*QueueMsg) MarshalToSizedBuffer ¶
func (*QueueMsg) ProtoMessage ¶
func (*QueueMsg) ProtoMessage()
func (*QueueMsg) XXX_DiscardUnknown ¶
func (m *QueueMsg) XXX_DiscardUnknown()
func (*QueueMsg) XXX_Marshal ¶
func (*QueueMsg) XXX_Unmarshal ¶
type ReqArg ¶
type ReqArg struct { Uid string `protobuf:"bytes,1,opt,name=Uid,proto3" json:"Uid,omitempty"` MsgID int32 `protobuf:"varint,2,opt,name=MsgID,proto3" json:"MsgID,omitempty"` Payload []byte `protobuf:"bytes,3,opt,name=Payload,proto3" json:"Payload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ReqArg) Descriptor ¶
func (*ReqArg) GetPayload ¶
func (*ReqArg) MarshalToSizedBuffer ¶
func (*ReqArg) ProtoMessage ¶
func (*ReqArg) ProtoMessage()
func (*ReqArg) XXX_DiscardUnknown ¶
func (m *ReqArg) XXX_DiscardUnknown()
func (*ReqArg) XXX_Marshal ¶
func (*ReqArg) XXX_Unmarshal ¶
type Request ¶
type Request struct { MsgID int32 `protobuf:"varint,1,opt,name=MsgID,proto3" json:"MsgID,omitempty"` Token string `protobuf:"bytes,2,opt,name=Token,proto3" json:"Token,omitempty"` Payload []byte `protobuf:"bytes,3,opt,name=Payload,proto3" json:"Payload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request) Descriptor ¶
func (*Request) GetPayload ¶
func (*Request) MarshalToSizedBuffer ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type RespMsg ¶
type RespMsg struct { MsgID int32 `protobuf:"varint,1,opt,name=MsgID,proto3" json:"MsgID,omitempty"` Code int32 `protobuf:"varint,2,opt,name=Code,proto3" json:"Code,omitempty"` AppId string `protobuf:"bytes,3,opt,name=AppId,proto3" json:"AppId,omitempty"` Payload []byte `protobuf:"bytes,4,opt,name=Payload,proto3" json:"Payload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RespMsg) Descriptor ¶
func (*RespMsg) GetPayload ¶
func (*RespMsg) MarshalToSizedBuffer ¶
func (*RespMsg) ProtoMessage ¶
func (*RespMsg) ProtoMessage()
func (*RespMsg) XXX_DiscardUnknown ¶
func (m *RespMsg) XXX_DiscardUnknown()
func (*RespMsg) XXX_Marshal ¶
func (*RespMsg) XXX_Unmarshal ¶
type Response ¶
type Response struct { MsgID int32 `protobuf:"varint,1,opt,name=MsgID,proto3" json:"MsgID,omitempty"` Code int32 `protobuf:"varint,2,opt,name=Code,proto3" json:"Code,omitempty"` Payload []byte `protobuf:"bytes,3,opt,name=Payload,proto3" json:"Payload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Response) Descriptor ¶
func (*Response) GetPayload ¶
func (*Response) MarshalToSizedBuffer ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
type RouterClient ¶
type RouterClient interface {
ReqCall(ctx context.Context, in *ReqArg, opts ...grpc.CallOption) (*RespMsg, error)
}
RouterClient is the client API for Router service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRouterClient ¶
func NewRouterClient(cc *grpc.ClientConn) RouterClient
type RouterServer ¶
RouterServer is the server API for Router service.
type Status ¶
type Status struct { Code int32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Status) Descriptor ¶
func (*Status) MarshalToSizedBuffer ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) XXX_DiscardUnknown ¶
func (m *Status) XXX_DiscardUnknown()
func (*Status) XXX_Marshal ¶
func (*Status) XXX_Unmarshal ¶
type Target ¶
type Target struct { GroupId map[string]bool `` /* 156-byte string literal not displayed */ Uids map[string]bool `` /* 150-byte string literal not displayed */ UnlessUids map[string]bool `` /* 162-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Target) Descriptor ¶
func (*Target) GetGroupId ¶
func (*Target) GetUnlessUids ¶
func (*Target) MarshalToSizedBuffer ¶
func (*Target) ProtoMessage ¶
func (*Target) ProtoMessage()
func (*Target) XXX_DiscardUnknown ¶
func (m *Target) XXX_DiscardUnknown()
func (*Target) XXX_Marshal ¶
func (*Target) XXX_Unmarshal ¶
type UnimplementedBroadcastServer ¶
type UnimplementedBroadcastServer struct { }
UnimplementedBroadcastServer can be embedded to have forward compatible implementations.
type UnimplementedRouterServer ¶
type UnimplementedRouterServer struct { }
UnimplementedRouterServer can be embedded to have forward compatible implementations.