PPMQSubscribe

package
v0.0.0-...-88f3d6a Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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)

func RegisterService

func RegisterService(s *pprpc.Service, hook Rpcer)

RegisterService 注册服务

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

type PPRpcServer interface {
	PCall(context.Context, *Req) (*Resp, error)
}

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) Descriptor() ([]byte, []int)

func (*Req) GetTopics

func (m *Req) GetTopics() []*TopicInfo

func (*Req) ProtoMessage

func (*Req) ProtoMessage()

func (*Req) Reset

func (m *Req) Reset()

func (*Req) String

func (m *Req) String() string

func (*Req) XXX_DiscardUnknown

func (m *Req) XXX_DiscardUnknown()

func (*Req) XXX_Marshal

func (m *Req) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Req) XXX_Merge

func (m *Req) XXX_Merge(src proto.Message)

func (*Req) XXX_Size

func (m *Req) XXX_Size() int

func (*Req) XXX_Unmarshal

func (m *Req) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Resp) GetAns

func (m *Resp) GetAns() []*TopicAnswer

func (*Resp) ProtoMessage

func (*Resp) ProtoMessage()

func (*Resp) Reset

func (m *Resp) Reset()

func (*Resp) String

func (m *Resp) String() string

func (*Resp) XXX_DiscardUnknown

func (m *Resp) XXX_DiscardUnknown()

func (*Resp) XXX_Marshal

func (m *Resp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Resp) XXX_Merge

func (m *Resp) XXX_Merge(src proto.Message)

func (*Resp) XXX_Size

func (m *Resp) XXX_Size() int

func (*Resp) XXX_Unmarshal

func (m *Resp) XXX_Unmarshal(b []byte) error

type Rpcer

type Rpcer interface {
	ReqHandle(c pprpc.RPCConn, pkg *packets.CmdPacket, req *Req) (err error)
	RespHandle(c pprpc.RPCConn, pkg *packets.CmdPacket, resp *Resp) (err error)
	DestructHandle(c pprpc.RPCConn, pkg *packets.CmdPacket, startMs int64)
}

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) Descriptor() ([]byte, []int)

func (*TopicInfo) GetCluster

func (m *TopicInfo) GetCluster() uint32

func (*TopicInfo) GetClusterSubid

func (m *TopicInfo) GetClusterSubid() string

func (*TopicInfo) GetQos

func (m *TopicInfo) GetQos() uint32

func (*TopicInfo) GetTopic

func (m *TopicInfo) GetTopic() string

func (*TopicInfo) ProtoMessage

func (*TopicInfo) ProtoMessage()

func (*TopicInfo) Reset

func (m *TopicInfo) Reset()

func (*TopicInfo) String

func (m *TopicInfo) String() string

func (*TopicInfo) XXX_DiscardUnknown

func (m *TopicInfo) XXX_DiscardUnknown()

func (*TopicInfo) XXX_Marshal

func (m *TopicInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TopicInfo) XXX_Merge

func (m *TopicInfo) XXX_Merge(src proto.Message)

func (*TopicInfo) XXX_Size

func (m *TopicInfo) XXX_Size() int

func (*TopicInfo) XXX_Unmarshal

func (m *TopicInfo) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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