Documentation
¶
Index ¶
- Variables
- func RegisterMessageServer(s *grpc.Server, srv MessageServer)
- type MessageClient
- type MessageServer
- type Message_SubscribeClient
- type Message_SubscribeServer
- type PubReq
- func (*PubReq) Descriptor() ([]byte, []int)deprecated
- func (x *PubReq) GetReq() *any.Any
- func (x *PubReq) GetResp() *any.Any
- func (x *PubReq) GetTopic() string
- func (*PubReq) ProtoMessage()
- func (x *PubReq) ProtoReflect() protoreflect.Message
- func (x *PubReq) Reset()
- func (x *PubReq) String() string
- type PubResp
- type SubReq
- func (*SubReq) Descriptor() ([]byte, []int)deprecated
- func (m *SubReq) GetOneof() isSubReq_Oneof
- func (x *SubReq) GetTopic() string
- func (x *SubReq) GetTopics() *Topics
- func (*SubReq) ProtoMessage()
- func (x *SubReq) ProtoReflect() protoreflect.Message
- func (x *SubReq) Reset()
- func (x *SubReq) String() string
- type SubReq_Topic
- type SubReq_Topics
- type Topics
- type UnimplementedMessageServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_broker_proto protoreflect.FileDescriptor
Functions ¶
func RegisterMessageServer ¶
func RegisterMessageServer(s *grpc.Server, srv MessageServer)
Types ¶
type MessageClient ¶
type MessageClient interface { Publish(ctx context.Context, in *PubReq, opts ...grpc.CallOption) (*PubResp, error) Subscribe(ctx context.Context, in *SubReq, opts ...grpc.CallOption) (Message_SubscribeClient, error) Ping(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) }
MessageClient is the client API for Message service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMessageClient ¶
func NewMessageClient(cc grpc.ClientConnInterface) MessageClient
type MessageServer ¶
type MessageServer interface { Publish(context.Context, *PubReq) (*PubResp, error) Subscribe(*SubReq, Message_SubscribeServer) error Ping(context.Context, *empty.Empty) (*empty.Empty, error) }
MessageServer is the server API for Message service.
type Message_SubscribeClient ¶
type Message_SubscribeClient interface { Recv() (*PubReq, error) grpc.ClientStream }
type Message_SubscribeServer ¶
type Message_SubscribeServer interface { Send(*PubReq) error grpc.ServerStream }
type PubReq ¶
type PubReq struct { Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` Req *any.Any `protobuf:"bytes,2,opt,name=req,proto3" json:"req,omitempty"` Resp *any.Any `protobuf:"bytes,3,opt,name=resp,proto3" json:"resp,omitempty"` // contains filtered or unexported fields }
func (*PubReq) Descriptor
deprecated
func (*PubReq) ProtoMessage ¶
func (*PubReq) ProtoMessage()
func (*PubReq) ProtoReflect ¶
func (x *PubReq) ProtoReflect() protoreflect.Message
type PubResp ¶
type PubResp struct { Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*PubResp) Descriptor
deprecated
func (*PubResp) ProtoMessage ¶
func (*PubResp) ProtoMessage()
func (*PubResp) ProtoReflect ¶
func (x *PubResp) ProtoReflect() protoreflect.Message
type SubReq ¶
type SubReq struct { // Types that are assignable to Oneof: // *SubReq_Topic // *SubReq_Topics Oneof isSubReq_Oneof `protobuf_oneof:"Oneof"` // contains filtered or unexported fields }
func (*SubReq) Descriptor
deprecated
func (*SubReq) ProtoMessage ¶
func (*SubReq) ProtoMessage()
func (*SubReq) ProtoReflect ¶
func (x *SubReq) ProtoReflect() protoreflect.Message
type SubReq_Topic ¶
type SubReq_Topic struct {
Topic string `protobuf:"bytes,1,opt,name=topic,proto3,oneof"`
}
type SubReq_Topics ¶
type SubReq_Topics struct {
Topics *Topics `protobuf:"bytes,2,opt,name=topics,proto3,oneof"`
}
type Topics ¶
type Topics struct { Topics []string `protobuf:"bytes,1,rep,name=topics,proto3" json:"topics,omitempty"` // contains filtered or unexported fields }
func (*Topics) Descriptor
deprecated
func (*Topics) ProtoMessage ¶
func (*Topics) ProtoMessage()
func (*Topics) ProtoReflect ¶
func (x *Topics) ProtoReflect() protoreflect.Message
type UnimplementedMessageServer ¶
type UnimplementedMessageServer struct { }
UnimplementedMessageServer can be embedded to have forward compatible implementations.
func (*UnimplementedMessageServer) Subscribe ¶
func (*UnimplementedMessageServer) Subscribe(*SubReq, Message_SubscribeServer) error
Click to show internal directories.
Click to hide internal directories.