Documentation ¶
Index ¶
- Variables
- func RegisterPublisherServer(s *grpc.Server, srv PublisherServer)
- func RegisterSubscriberServer(s *grpc.Server, srv SubscriberServer)
- type PublisherClient
- type PublisherServer
- type SendRequest
- func (*SendRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendRequest) GetMessage() []byte
- func (x *SendRequest) GetTopic() string
- func (*SendRequest) ProtoMessage()
- func (x *SendRequest) ProtoReflect() protoreflect.Message
- func (x *SendRequest) Reset()
- func (x *SendRequest) String() string
- type SubscribeRequest
- func (*SubscribeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeRequest) GetGroup() string
- func (x *SubscribeRequest) GetTopic() string
- func (*SubscribeRequest) ProtoMessage()
- func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
- func (x *SubscribeRequest) Reset()
- func (x *SubscribeRequest) String() string
- type SubscribeResponse
- type SubscriberClient
- type SubscriberServer
- type Subscriber_SubscribeClient
- type Subscriber_SubscribeServer
- type UnimplementedPublisherServer
- type UnimplementedSubscriberServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_publisher_proto protoreflect.FileDescriptor
var File_proto_subscriber_proto protoreflect.FileDescriptor
Functions ¶
func RegisterPublisherServer ¶
func RegisterPublisherServer(s *grpc.Server, srv PublisherServer)
func RegisterSubscriberServer ¶
func RegisterSubscriberServer(s *grpc.Server, srv SubscriberServer)
Types ¶
type PublisherClient ¶
type PublisherClient interface { // todo client streaming Send(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*empty.Empty, error) }
PublisherClient is the client API for Publisher service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPublisherClient ¶
func NewPublisherClient(cc grpc.ClientConnInterface) PublisherClient
type PublisherServer ¶
type PublisherServer interface { // todo client streaming Send(context.Context, *SendRequest) (*empty.Empty, error) // contains filtered or unexported methods }
PublisherServer is the server API for Publisher service. All implementations must embed UnimplementedPublisherServer for forward compatibility
type SendRequest ¶
type SendRequest struct { Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` Message []byte `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*SendRequest) Descriptor
deprecated
func (*SendRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.
func (*SendRequest) GetMessage ¶
func (x *SendRequest) GetMessage() []byte
func (*SendRequest) GetTopic ¶
func (x *SendRequest) GetTopic() string
func (*SendRequest) ProtoMessage ¶
func (*SendRequest) ProtoMessage()
func (*SendRequest) ProtoReflect ¶
func (x *SendRequest) ProtoReflect() protoreflect.Message
func (*SendRequest) Reset ¶
func (x *SendRequest) Reset()
func (*SendRequest) String ¶
func (x *SendRequest) String() string
type SubscribeRequest ¶
type SubscribeRequest struct { Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` Group string `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` // contains filtered or unexported fields }
func (*SubscribeRequest) Descriptor
deprecated
func (*SubscribeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.
func (*SubscribeRequest) GetGroup ¶
func (x *SubscribeRequest) GetGroup() string
func (*SubscribeRequest) GetTopic ¶
func (x *SubscribeRequest) GetTopic() string
func (*SubscribeRequest) ProtoMessage ¶
func (*SubscribeRequest) ProtoMessage()
func (*SubscribeRequest) ProtoReflect ¶
func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
func (*SubscribeRequest) Reset ¶
func (x *SubscribeRequest) Reset()
func (*SubscribeRequest) String ¶
func (x *SubscribeRequest) String() string
type SubscribeResponse ¶
type SubscribeResponse struct { Message []byte `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*SubscribeResponse) Descriptor
deprecated
func (*SubscribeResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.
func (*SubscribeResponse) GetMessage ¶
func (x *SubscribeResponse) GetMessage() []byte
func (*SubscribeResponse) ProtoMessage ¶
func (*SubscribeResponse) ProtoMessage()
func (*SubscribeResponse) ProtoReflect ¶
func (x *SubscribeResponse) ProtoReflect() protoreflect.Message
func (*SubscribeResponse) Reset ¶
func (x *SubscribeResponse) Reset()
func (*SubscribeResponse) String ¶
func (x *SubscribeResponse) String() string
type SubscriberClient ¶
type SubscriberClient interface {
Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (Subscriber_SubscribeClient, error)
}
SubscriberClient is the client API for Subscriber service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewSubscriberClient ¶
func NewSubscriberClient(cc grpc.ClientConnInterface) SubscriberClient
type SubscriberServer ¶
type SubscriberServer interface { Subscribe(*SubscribeRequest, Subscriber_SubscribeServer) error // contains filtered or unexported methods }
SubscriberServer is the server API for Subscriber service. All implementations must embed UnimplementedSubscriberServer for forward compatibility
type Subscriber_SubscribeClient ¶
type Subscriber_SubscribeClient interface { Recv() (*SubscribeResponse, error) grpc.ClientStream }
type Subscriber_SubscribeServer ¶
type Subscriber_SubscribeServer interface { Send(*SubscribeResponse) error grpc.ServerStream }
type UnimplementedPublisherServer ¶
type UnimplementedPublisherServer struct { }
UnimplementedPublisherServer must be embedded to have forward compatible implementations.
func (*UnimplementedPublisherServer) Send ¶
func (*UnimplementedPublisherServer) Send(context.Context, *SendRequest) (*empty.Empty, error)
type UnimplementedSubscriberServer ¶
type UnimplementedSubscriberServer struct { }
UnimplementedSubscriberServer must be embedded to have forward compatible implementations.
func (*UnimplementedSubscriberServer) Subscribe ¶
func (*UnimplementedSubscriberServer) Subscribe(*SubscribeRequest, Subscriber_SubscribeServer) error