Documentation ¶
Index ¶
- Variables
- func RegisterBrokerServer(s grpc.ServiceRegistrar, srv BrokerServer)
- type BrokerClient
- type BrokerServer
- type BrokerStub
- type BrokerStub_PublishStreamer
- type BrokerStub_SubscribeStreamer
- type Broker_PublishClient
- type Broker_PublishServer
- type Broker_SubscribeClient
- type Broker_SubscribeServer
- type Empty
- type Message
- type PublishRequest
- func (*PublishRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PublishRequest) GetMessages() []*Message
- func (x *PublishRequest) GetTopic() string
- func (*PublishRequest) ProtoMessage()
- func (x *PublishRequest) ProtoReflect() protoreflect.Message
- func (x *PublishRequest) Reset()
- func (x *PublishRequest) String() string
- type SubscribeRequest
- func (*SubscribeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeRequest) GetId() string
- func (x *SubscribeRequest) GetQueue() 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
- func (*SubscribeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeResponse) GetId() string
- func (x *SubscribeResponse) GetMessages() []*Message
- func (*SubscribeResponse) ProtoMessage()
- func (x *SubscribeResponse) ProtoReflect() protoreflect.Message
- func (x *SubscribeResponse) Reset()
- func (x *SubscribeResponse) String() string
- type UnimplementedBrokerServer
- type UnsafeBrokerServer
Constants ¶
This section is empty.
Variables ¶
var Broker_ServiceDesc = grpc.ServiceDesc{ ServiceName: "broker.Broker", HandlerType: (*BrokerServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Publish", Handler: _Broker_Publish_Handler, ClientStreams: true, }, { StreamName: "Subscribe", Handler: _Broker_Subscribe_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "cells-message.proto", }
Broker_ServiceDesc is the grpc.ServiceDesc for Broker service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_cells_message_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBrokerServer ¶
func RegisterBrokerServer(s grpc.ServiceRegistrar, srv BrokerServer)
Types ¶
type BrokerClient ¶
type BrokerClient interface { Publish(ctx context.Context, opts ...grpc.CallOption) (Broker_PublishClient, error) Subscribe(ctx context.Context, opts ...grpc.CallOption) (Broker_SubscribeClient, error) }
BrokerClient is the client API for Broker 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 NewBrokerClient ¶
func NewBrokerClient(cc grpc.ClientConnInterface) BrokerClient
type BrokerServer ¶
type BrokerServer interface { Publish(Broker_PublishServer) error Subscribe(Broker_SubscribeServer) error // contains filtered or unexported methods }
BrokerServer is the server API for Broker service. All implementations must embed UnimplementedBrokerServer for forward compatibility
type BrokerStub ¶
type BrokerStub struct {
BrokerServer
}
func (*BrokerStub) Invoke ¶
func (s *BrokerStub) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error
func (*BrokerStub) NewStream ¶
func (s *BrokerStub) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)
type BrokerStub_PublishStreamer ¶
type BrokerStub_PublishStreamer struct {
stubs.BidirServerStreamerCore
}
func (*BrokerStub_PublishStreamer) Recv ¶
func (s *BrokerStub_PublishStreamer) Recv() (*PublishRequest, error)
func (*BrokerStub_PublishStreamer) Send ¶
func (s *BrokerStub_PublishStreamer) Send(response *Empty) error
func (*BrokerStub_PublishStreamer) SendAndClose ¶
func (s *BrokerStub_PublishStreamer) SendAndClose(*Empty) error
type BrokerStub_SubscribeStreamer ¶
type BrokerStub_SubscribeStreamer struct {
stubs.BidirServerStreamerCore
}
func (*BrokerStub_SubscribeStreamer) Recv ¶
func (s *BrokerStub_SubscribeStreamer) Recv() (*SubscribeRequest, error)
func (*BrokerStub_SubscribeStreamer) Send ¶
func (s *BrokerStub_SubscribeStreamer) Send(response *SubscribeResponse) error
type Broker_PublishClient ¶
type Broker_PublishClient interface { Send(*PublishRequest) error CloseAndRecv() (*Empty, error) grpc.ClientStream }
type Broker_PublishServer ¶
type Broker_PublishServer interface { SendAndClose(*Empty) error Recv() (*PublishRequest, error) grpc.ServerStream }
type Broker_SubscribeClient ¶
type Broker_SubscribeClient interface { Send(*SubscribeRequest) error Recv() (*SubscribeResponse, error) grpc.ClientStream }
type Broker_SubscribeServer ¶
type Broker_SubscribeServer interface { Send(*SubscribeResponse) error Recv() (*SubscribeRequest, error) grpc.ServerStream }
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Message ¶
type Message struct { Header map[string]string `` /* 153-byte string literal not displayed */ Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type PublishRequest ¶
type PublishRequest struct { Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` Messages []*Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"` // contains filtered or unexported fields }
func (*PublishRequest) Descriptor
deprecated
func (*PublishRequest) Descriptor() ([]byte, []int)
Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.
func (*PublishRequest) GetMessages ¶
func (x *PublishRequest) GetMessages() []*Message
func (*PublishRequest) GetTopic ¶
func (x *PublishRequest) GetTopic() string
func (*PublishRequest) ProtoMessage ¶
func (*PublishRequest) ProtoMessage()
func (*PublishRequest) ProtoReflect ¶
func (x *PublishRequest) ProtoReflect() protoreflect.Message
func (*PublishRequest) Reset ¶
func (x *PublishRequest) Reset()
func (*PublishRequest) String ¶
func (x *PublishRequest) String() string
type SubscribeRequest ¶
type SubscribeRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` Queue string `protobuf:"bytes,3,opt,name=queue,proto3" json:"queue,omitempty"` // contains filtered or unexported fields }
func (*SubscribeRequest) Descriptor
deprecated
func (*SubscribeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.
func (*SubscribeRequest) GetId ¶
func (x *SubscribeRequest) GetId() string
func (*SubscribeRequest) GetQueue ¶
func (x *SubscribeRequest) GetQueue() 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 { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Messages []*Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"` // contains filtered or unexported fields }
func (*SubscribeResponse) Descriptor
deprecated
func (*SubscribeResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.
func (*SubscribeResponse) GetId ¶
func (x *SubscribeResponse) GetId() string
func (*SubscribeResponse) GetMessages ¶
func (x *SubscribeResponse) GetMessages() []*Message
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 UnimplementedBrokerServer ¶
type UnimplementedBrokerServer struct { }
UnimplementedBrokerServer must be embedded to have forward compatible implementations.
func (UnimplementedBrokerServer) Publish ¶
func (UnimplementedBrokerServer) Publish(Broker_PublishServer) error
func (UnimplementedBrokerServer) Subscribe ¶
func (UnimplementedBrokerServer) Subscribe(Broker_SubscribeServer) error
type UnsafeBrokerServer ¶
type UnsafeBrokerServer interface {
// contains filtered or unexported methods
}
UnsafeBrokerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BrokerServer will result in compilation errors.