Documentation ¶
Index ¶
- Variables
- func RegisterServiceServer(s *grpc.Server, srv ServiceServer)
- type ReceiveCommandAck
- type ReceiveCommandStart
- func (*ReceiveCommandStart) Descriptor() ([]byte, []int)deprecated
- func (x *ReceiveCommandStart) GetSubId() string
- func (*ReceiveCommandStart) ProtoMessage()
- func (x *ReceiveCommandStart) ProtoReflect() protoreflect.Message
- func (x *ReceiveCommandStart) Reset()
- func (x *ReceiveCommandStart) String() string
- type ReceiveRequest
- func (*ReceiveRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReceiveRequest) GetAck() *ReceiveCommandAck
- func (m *ReceiveRequest) GetCommand() isReceiveRequest_Command
- func (x *ReceiveRequest) GetStart() *ReceiveCommandStart
- func (*ReceiveRequest) ProtoMessage()
- func (x *ReceiveRequest) ProtoReflect() protoreflect.Message
- func (x *ReceiveRequest) Reset()
- func (x *ReceiveRequest) String() string
- type ReceiveRequest_Ack
- type ReceiveRequest_Start
- type Service
- type ServiceClient
- type ServiceServer
- type Service_ReceiveClient
- type Service_ReceiveServer
- type UnimplementedServiceServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInternal = errors.New("internal failure")
View Source
var ErrNotFound = errors.New("not found")
View Source
var File_api_grpc_messages_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterServiceServer ¶ added in v0.0.2
func RegisterServiceServer(s *grpc.Server, srv ServiceServer)
Types ¶
type ReceiveCommandAck ¶ added in v0.0.2
type ReceiveCommandAck struct { Ack bool `protobuf:"varint,1,opt,name=ack,proto3" json:"ack,omitempty"` // contains filtered or unexported fields }
func (*ReceiveCommandAck) Descriptor
deprecated
added in
v0.0.2
func (*ReceiveCommandAck) Descriptor() ([]byte, []int)
Deprecated: Use ReceiveCommandAck.ProtoReflect.Descriptor instead.
func (*ReceiveCommandAck) GetAck ¶ added in v0.0.2
func (x *ReceiveCommandAck) GetAck() bool
func (*ReceiveCommandAck) ProtoMessage ¶ added in v0.0.2
func (*ReceiveCommandAck) ProtoMessage()
func (*ReceiveCommandAck) ProtoReflect ¶ added in v0.0.2
func (x *ReceiveCommandAck) ProtoReflect() protoreflect.Message
func (*ReceiveCommandAck) Reset ¶ added in v0.0.2
func (x *ReceiveCommandAck) Reset()
func (*ReceiveCommandAck) String ¶ added in v0.0.2
func (x *ReceiveCommandAck) String() string
type ReceiveCommandStart ¶ added in v0.0.2
type ReceiveCommandStart struct { SubId string `protobuf:"bytes,1,opt,name=subId,proto3" json:"subId,omitempty"` // contains filtered or unexported fields }
func (*ReceiveCommandStart) Descriptor
deprecated
added in
v0.0.2
func (*ReceiveCommandStart) Descriptor() ([]byte, []int)
Deprecated: Use ReceiveCommandStart.ProtoReflect.Descriptor instead.
func (*ReceiveCommandStart) GetSubId ¶ added in v0.0.2
func (x *ReceiveCommandStart) GetSubId() string
func (*ReceiveCommandStart) ProtoMessage ¶ added in v0.0.2
func (*ReceiveCommandStart) ProtoMessage()
func (*ReceiveCommandStart) ProtoReflect ¶ added in v0.0.2
func (x *ReceiveCommandStart) ProtoReflect() protoreflect.Message
func (*ReceiveCommandStart) Reset ¶ added in v0.0.2
func (x *ReceiveCommandStart) Reset()
func (*ReceiveCommandStart) String ¶ added in v0.0.2
func (x *ReceiveCommandStart) String() string
type ReceiveRequest ¶ added in v0.0.2
type ReceiveRequest struct { // Types that are assignable to Command: // // *ReceiveRequest_Start // *ReceiveRequest_Ack Command isReceiveRequest_Command `protobuf_oneof:"command"` // contains filtered or unexported fields }
func (*ReceiveRequest) Descriptor
deprecated
added in
v0.0.2
func (*ReceiveRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReceiveRequest.ProtoReflect.Descriptor instead.
func (*ReceiveRequest) GetAck ¶ added in v0.0.2
func (x *ReceiveRequest) GetAck() *ReceiveCommandAck
func (*ReceiveRequest) GetCommand ¶ added in v0.0.2
func (m *ReceiveRequest) GetCommand() isReceiveRequest_Command
func (*ReceiveRequest) GetStart ¶ added in v0.0.2
func (x *ReceiveRequest) GetStart() *ReceiveCommandStart
func (*ReceiveRequest) ProtoMessage ¶ added in v0.0.2
func (*ReceiveRequest) ProtoMessage()
func (*ReceiveRequest) ProtoReflect ¶ added in v0.0.2
func (x *ReceiveRequest) ProtoReflect() protoreflect.Message
func (*ReceiveRequest) Reset ¶ added in v0.0.2
func (x *ReceiveRequest) Reset()
func (*ReceiveRequest) String ¶ added in v0.0.2
func (x *ReceiveRequest) String() string
type ReceiveRequest_Ack ¶ added in v0.0.2
type ReceiveRequest_Ack struct {
Ack *ReceiveCommandAck `protobuf:"bytes,2,opt,name=ack,proto3,oneof"`
}
type ReceiveRequest_Start ¶ added in v0.0.2
type ReceiveRequest_Start struct {
Start *ReceiveCommandStart `protobuf:"bytes,1,opt,name=start,proto3,oneof"`
}
type Service ¶
type Service interface {
Read(ctx context.Context, userId, subId string) (rs model.ReadStream[*pb.CloudEvent], err error)
}
func NewService ¶
func NewService(client ServiceClient) Service
func NewServiceMock ¶
func NewServiceMock() Service
type ServiceClient ¶ added in v0.0.2
type ServiceClient interface { // Start receiving a messages for a certain subscription id. // Client should send the acknowledgement for every received message. Receive(ctx context.Context, opts ...grpc.CallOption) (Service_ReceiveClient, 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 ¶ added in v0.0.2
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶ added in v0.0.2
type ServiceServer interface { // Start receiving a messages for a certain subscription id. // Client should send the acknowledgement for every received message. Receive(Service_ReceiveServer) error }
ServiceServer is the server API for Service service.
type Service_ReceiveClient ¶ added in v0.0.2
type Service_ReceiveClient interface { Send(*ReceiveRequest) error Recv() (*pb.CloudEvent, error) grpc.ClientStream }
type Service_ReceiveServer ¶ added in v0.0.2
type Service_ReceiveServer interface { Send(*pb.CloudEvent) error Recv() (*ReceiveRequest, error) grpc.ServerStream }
type UnimplementedServiceServer ¶ added in v0.0.2
type UnimplementedServiceServer struct { }
UnimplementedServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedServiceServer) Receive ¶ added in v0.0.2
func (*UnimplementedServiceServer) Receive(Service_ReceiveServer) error
Click to show internal directories.
Click to hide internal directories.