Documentation ¶
Index ¶
- Constants
- func RegisterPPRpcServer(s *grpc.Server, srv PPRpcServer)
- func RegisterService(s *pprpc.Service, hook Rpcer)
- type PPMQSubscribeClient
- type PPRpcClient
- type PPRpcServer
- type Req
- func (*Req) Descriptor() ([]byte, []int)
- func (m *Req) GetTopics() []*TopicInfo
- func (*Req) ProtoMessage()
- func (m *Req) Reset()
- func (m *Req) String() string
- func (m *Req) XXX_DiscardUnknown()
- func (m *Req) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Req) XXX_Merge(src proto.Message)
- func (m *Req) XXX_Size() int
- func (m *Req) XXX_Unmarshal(b []byte) error
- type Resp
- func (*Resp) Descriptor() ([]byte, []int)
- func (m *Resp) GetAns() []*TopicAnswer
- func (*Resp) ProtoMessage()
- func (m *Resp) Reset()
- func (m *Resp) String() string
- func (m *Resp) XXX_DiscardUnknown()
- func (m *Resp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Resp) XXX_Merge(src proto.Message)
- func (m *Resp) XXX_Size() int
- func (m *Resp) XXX_Unmarshal(b []byte) error
- type Rpcer
- type TopicAnswer
- func (*TopicAnswer) Descriptor() ([]byte, []int)
- func (m *TopicAnswer) GetQos() uint32
- func (m *TopicAnswer) GetTopic() string
- func (*TopicAnswer) ProtoMessage()
- func (m *TopicAnswer) Reset()
- func (m *TopicAnswer) String() string
- func (m *TopicAnswer) XXX_DiscardUnknown()
- func (m *TopicAnswer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TopicAnswer) XXX_Merge(src proto.Message)
- func (m *TopicAnswer) XXX_Size() int
- func (m *TopicAnswer) XXX_Unmarshal(b []byte) error
- type TopicInfo
- func (*TopicInfo) Descriptor() ([]byte, []int)
- func (m *TopicInfo) GetCluster() uint32
- func (m *TopicInfo) GetClusterSubid() string
- func (m *TopicInfo) GetQos() uint32
- func (m *TopicInfo) GetTopic() string
- func (*TopicInfo) ProtoMessage()
- func (m *TopicInfo) Reset()
- func (m *TopicInfo) String() string
- func (m *TopicInfo) XXX_DiscardUnknown()
- func (m *TopicInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TopicInfo) XXX_Merge(src proto.Message)
- func (m *TopicInfo) XXX_Size() int
- func (m *TopicInfo) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const ( CmdID uint64 = 17 CmdName string = "PPMQSubscribe" Module string = "ppmqd" )
Variables ¶
This section is empty.
Functions ¶
func RegisterPPRpcServer ¶
func RegisterPPRpcServer(s *grpc.Server, srv PPRpcServer)
Types ¶
type PPMQSubscribeClient ¶
type PPMQSubscribeClient interface {
PPCall(ctx context.Context, in *Req) (*Resp, *packets.CmdPacket, error)
}
func NewPPMQSubscribeClient ¶
func NewPPMQSubscribeClient(cc pprpc.RPCCliConn) PPMQSubscribeClient
type PPRpcClient ¶
type PPRpcClient interface {
PCall(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Resp, error)
}
PPRpcClient is the client API for PPRpc service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPPRpcClient ¶
func NewPPRpcClient(cc *grpc.ClientConn) PPRpcClient
type PPRpcServer ¶
PPRpcServer is the server API for PPRpc service.
type Req ¶
type Req struct { Topics []*TopicInfo `protobuf:"bytes,1,rep,name=topics,proto3" json:"topics"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Reqest
func (*Req) Descriptor ¶
func (*Req) ProtoMessage ¶
func (*Req) ProtoMessage()
func (*Req) XXX_DiscardUnknown ¶
func (m *Req) XXX_DiscardUnknown()
func (*Req) XXX_Unmarshal ¶
type Resp ¶
type Resp struct { Ans []*TopicAnswer `protobuf:"bytes,1,rep,name=ans,proto3" json:"ans"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Response
func (*Resp) Descriptor ¶
func (*Resp) GetAns ¶
func (m *Resp) GetAns() []*TopicAnswer
func (*Resp) ProtoMessage ¶
func (*Resp) ProtoMessage()
func (*Resp) XXX_DiscardUnknown ¶
func (m *Resp) XXX_DiscardUnknown()
func (*Resp) XXX_Unmarshal ¶
type TopicAnswer ¶
type TopicAnswer struct { // 主题过滤器(可以使用正则表达式) Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic"` Qos uint32 `protobuf:"varint,2,opt,name=qos,proto3" json:"qos"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TopicAnswer) Descriptor ¶
func (*TopicAnswer) Descriptor() ([]byte, []int)
func (*TopicAnswer) GetQos ¶
func (m *TopicAnswer) GetQos() uint32
func (*TopicAnswer) GetTopic ¶
func (m *TopicAnswer) GetTopic() string
func (*TopicAnswer) ProtoMessage ¶
func (*TopicAnswer) ProtoMessage()
func (*TopicAnswer) Reset ¶
func (m *TopicAnswer) Reset()
func (*TopicAnswer) String ¶
func (m *TopicAnswer) String() string
func (*TopicAnswer) XXX_DiscardUnknown ¶
func (m *TopicAnswer) XXX_DiscardUnknown()
func (*TopicAnswer) XXX_Marshal ¶
func (m *TopicAnswer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TopicAnswer) XXX_Merge ¶
func (m *TopicAnswer) XXX_Merge(src proto.Message)
func (*TopicAnswer) XXX_Size ¶
func (m *TopicAnswer) XXX_Size() int
func (*TopicAnswer) XXX_Unmarshal ¶
func (m *TopicAnswer) XXX_Unmarshal(b []byte) error
type TopicInfo ¶
type TopicInfo struct { // 主题过滤器(可以使用正则表达式) Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic"` // 订阅质量等级 Qos uint32 `protobuf:"varint,2,opt,name=qos,proto3" json:"qos"` // cluster = 1: 属于集群消费,表示同一个cluster_subid订阅的topic将按照顺序的方式将消息发送到订阅者(分开消费). // cluster = 2: 属于广播消费,表示相同的cluster_subid订阅的topic将每个消息都消费到. // 如果没有设置,则满足订阅条件的消息都各自消费. Cluster uint32 `protobuf:"varint,3,opt,name=cluster,proto3" json:"cluster"` ClusterSubid string `protobuf:"bytes,4,opt,name=cluster_subid,json=clusterSubid,proto3" json:"cluster_subid"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TopicInfo) Descriptor ¶
func (*TopicInfo) GetCluster ¶
func (*TopicInfo) GetClusterSubid ¶
func (*TopicInfo) ProtoMessage ¶
func (*TopicInfo) ProtoMessage()
func (*TopicInfo) XXX_DiscardUnknown ¶
func (m *TopicInfo) XXX_DiscardUnknown()
func (*TopicInfo) XXX_Marshal ¶
func (*TopicInfo) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.