Documentation ¶
Index ¶
- Variables
- func RegisterServiceServer(s *grpc.Server, srv ServiceServer)
- type ReadCommandAck
- type ReadCommandStart
- func (*ReadCommandStart) Descriptor() ([]byte, []int)deprecated
- func (x *ReadCommandStart) GetBatchSize() uint32
- func (x *ReadCommandStart) GetSubId() string
- func (*ReadCommandStart) ProtoMessage()
- func (x *ReadCommandStart) ProtoReflect() protoreflect.Message
- func (x *ReadCommandStart) Reset()
- func (x *ReadCommandStart) String() string
- type ReadRequest
- func (*ReadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadRequest) GetAck() *ReadCommandAck
- func (m *ReadRequest) GetCommand() isReadRequest_Command
- func (x *ReadRequest) GetStart() *ReadCommandStart
- func (*ReadRequest) ProtoMessage()
- func (x *ReadRequest) ProtoReflect() protoreflect.Message
- func (x *ReadRequest) Reset()
- func (x *ReadRequest) String() string
- type ReadRequest_Ack
- type ReadRequest_Start
- type ReadResponse
- type Service
- type ServiceClient
- type ServiceServer
- type Service_ReadClient
- type Service_ReadServer
- type UnimplementedServiceServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInternal = errors.New("internal failure")
View Source
var ErrInvalidRequest = errors.New("invalid request")
View Source
var ErrNotFound = errors.New("subscription not found")
View Source
var File_api_grpc_reader_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s *grpc.Server, srv ServiceServer)
Types ¶
type ReadCommandAck ¶
type ReadCommandAck struct { Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*ReadCommandAck) Descriptor
deprecated
func (*ReadCommandAck) Descriptor() ([]byte, []int)
Deprecated: Use ReadCommandAck.ProtoReflect.Descriptor instead.
func (*ReadCommandAck) GetCount ¶
func (x *ReadCommandAck) GetCount() uint32
func (*ReadCommandAck) ProtoMessage ¶
func (*ReadCommandAck) ProtoMessage()
func (*ReadCommandAck) ProtoReflect ¶
func (x *ReadCommandAck) ProtoReflect() protoreflect.Message
func (*ReadCommandAck) Reset ¶
func (x *ReadCommandAck) Reset()
func (*ReadCommandAck) String ¶
func (x *ReadCommandAck) String() string
type ReadCommandStart ¶
type ReadCommandStart struct { SubId string `protobuf:"bytes,1,opt,name=subId,proto3" json:"subId,omitempty"` BatchSize uint32 `protobuf:"varint,2,opt,name=batchSize,proto3" json:"batchSize,omitempty"` // contains filtered or unexported fields }
func (*ReadCommandStart) Descriptor
deprecated
func (*ReadCommandStart) Descriptor() ([]byte, []int)
Deprecated: Use ReadCommandStart.ProtoReflect.Descriptor instead.
func (*ReadCommandStart) GetBatchSize ¶
func (x *ReadCommandStart) GetBatchSize() uint32
func (*ReadCommandStart) GetSubId ¶
func (x *ReadCommandStart) GetSubId() string
func (*ReadCommandStart) ProtoMessage ¶
func (*ReadCommandStart) ProtoMessage()
func (*ReadCommandStart) ProtoReflect ¶
func (x *ReadCommandStart) ProtoReflect() protoreflect.Message
func (*ReadCommandStart) Reset ¶
func (x *ReadCommandStart) Reset()
func (*ReadCommandStart) String ¶
func (x *ReadCommandStart) String() string
type ReadRequest ¶
type ReadRequest struct { // Types that are assignable to Command: // // *ReadRequest_Start // *ReadRequest_Ack Command isReadRequest_Command `protobuf_oneof:"command"` // contains filtered or unexported fields }
func (*ReadRequest) Descriptor
deprecated
func (*ReadRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.
func (*ReadRequest) GetAck ¶
func (x *ReadRequest) GetAck() *ReadCommandAck
func (*ReadRequest) GetCommand ¶
func (m *ReadRequest) GetCommand() isReadRequest_Command
func (*ReadRequest) GetStart ¶
func (x *ReadRequest) GetStart() *ReadCommandStart
func (*ReadRequest) ProtoMessage ¶
func (*ReadRequest) ProtoMessage()
func (*ReadRequest) ProtoReflect ¶
func (x *ReadRequest) ProtoReflect() protoreflect.Message
func (*ReadRequest) Reset ¶
func (x *ReadRequest) Reset()
func (*ReadRequest) String ¶
func (x *ReadRequest) String() string
type ReadRequest_Ack ¶
type ReadRequest_Ack struct {
Ack *ReadCommandAck `protobuf:"bytes,2,opt,name=ack,proto3,oneof"`
}
type ReadRequest_Start ¶
type ReadRequest_Start struct {
Start *ReadCommandStart `protobuf:"bytes,1,opt,name=start,proto3,oneof"`
}
type ReadResponse ¶
type ReadResponse struct { Msgs []*pb.CloudEvent `protobuf:"bytes,1,rep,name=msgs,proto3" json:"msgs,omitempty"` // contains filtered or unexported fields }
func (*ReadResponse) Descriptor
deprecated
func (*ReadResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.
func (*ReadResponse) GetMsgs ¶
func (x *ReadResponse) GetMsgs() []*pb.CloudEvent
func (*ReadResponse) ProtoMessage ¶
func (*ReadResponse) ProtoMessage()
func (*ReadResponse) ProtoReflect ¶
func (x *ReadResponse) ProtoReflect() protoreflect.Message
func (*ReadResponse) Reset ¶
func (x *ReadResponse) Reset()
func (*ReadResponse) String ¶
func (x *ReadResponse) String() string
type Service ¶
type Service interface { OpenReader(ctx context.Context, userId, subId string, batchSize uint32) (rs model.Reader[[]*pb.CloudEvent], err error) OpenAckReader(ctx context.Context, userId, subId string, batchSize uint32) (r model.AckReader[[]*pb.CloudEvent], err error) }
func NewService ¶
func NewService(client ServiceClient) Service
func NewServiceMock ¶
func NewServiceMock() Service
type ServiceClient ¶
type ServiceClient interface { // Start reading messages for a certain subscription id. // For every response, a client should sent the acknowledged messages count. Read(ctx context.Context, opts ...grpc.CallOption) (Service_ReadClient, error) }
ServiceClient is the client API for Service service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { // Start reading messages for a certain subscription id. // For every response, a client should sent the acknowledged messages count. Read(Service_ReadServer) error }
ServiceServer is the server API for Service service.
type Service_ReadClient ¶
type Service_ReadClient interface { Send(*ReadRequest) error Recv() (*ReadResponse, error) grpc.ClientStream }
type Service_ReadServer ¶
type Service_ReadServer interface { Send(*ReadResponse) error Recv() (*ReadRequest, error) grpc.ServerStream }
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedServiceServer) Read ¶
func (*UnimplementedServiceServer) Read(Service_ReadServer) error
Click to show internal directories.
Click to hide internal directories.