Documentation
¶
Index ¶
- Variables
- func RegisterStreamAPIServer(s *grpc.Server, srv StreamAPIServer)
- type ConsumeRequest
- func (*ConsumeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ConsumeRequest) GetApplicationKey() string
- func (x *ConsumeRequest) GetEventTypes() []*EventType
- func (x *ConsumeRequest) GetOffset() uint64
- func (m *ConsumeRequest) GetStartPoint() isConsumeRequest_StartPoint
- func (*ConsumeRequest) ProtoMessage()
- func (x *ConsumeRequest) ProtoReflect() protoreflect.Message
- func (x *ConsumeRequest) Reset()
- func (x *ConsumeRequest) String() string
- type ConsumeRequest_Offset
- type ConsumeResponse
- func (*ConsumeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ConsumeResponse) GetEnvelope() *envelopespec.Envelope
- func (x *ConsumeResponse) GetOffset() uint64
- func (*ConsumeResponse) ProtoMessage()
- func (x *ConsumeResponse) ProtoReflect() protoreflect.Message
- func (x *ConsumeResponse) Reset()
- func (x *ConsumeResponse) String() string
- type EventType
- type EventTypesRequest
- type EventTypesResponse
- func (*EventTypesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EventTypesResponse) GetEventTypes() []*EventType
- func (*EventTypesResponse) ProtoMessage()
- func (x *EventTypesResponse) ProtoReflect() protoreflect.Message
- func (x *EventTypesResponse) Reset()
- func (x *EventTypesResponse) String() string
- type NoRecognizedMediaTypes
- func (*NoRecognizedMediaTypes) Descriptor() ([]byte, []int)deprecated
- func (x *NoRecognizedMediaTypes) GetPortableName() string
- func (*NoRecognizedMediaTypes) ProtoMessage()
- func (x *NoRecognizedMediaTypes) ProtoReflect() protoreflect.Message
- func (x *NoRecognizedMediaTypes) Reset()
- func (x *NoRecognizedMediaTypes) String() string
- type StreamAPIClient
- type StreamAPIServer
- type StreamAPI_ConsumeClient
- type StreamAPI_ConsumeServer
- type UnimplementedStartPointMechanism
- func (*UnimplementedStartPointMechanism) Descriptor() ([]byte, []int)deprecated
- func (*UnimplementedStartPointMechanism) ProtoMessage()
- func (x *UnimplementedStartPointMechanism) ProtoReflect() protoreflect.Message
- func (x *UnimplementedStartPointMechanism) Reset()
- func (x *UnimplementedStartPointMechanism) String() string
- type UnimplementedStreamAPIServer
- type UnrecognizedApplication
- func (*UnrecognizedApplication) Descriptor() ([]byte, []int)deprecated
- func (x *UnrecognizedApplication) GetApplicationKey() string
- func (*UnrecognizedApplication) ProtoMessage()
- func (x *UnrecognizedApplication) ProtoReflect() protoreflect.Message
- func (x *UnrecognizedApplication) Reset()
- func (x *UnrecognizedApplication) String() string
- type UnrecognizedEventType
- func (*UnrecognizedEventType) Descriptor() ([]byte, []int)deprecated
- func (x *UnrecognizedEventType) GetPortableName() string
- func (*UnrecognizedEventType) ProtoMessage()
- func (x *UnrecognizedEventType) ProtoReflect() protoreflect.Message
- func (x *UnrecognizedEventType) Reset()
- func (x *UnrecognizedEventType) String() string
Constants ¶
This section is empty.
Variables ¶
var File_github_com_dogmatiq_interopspec_eventstreamspec_streamapi_proto protoreflect.FileDescriptor
Functions ¶
func RegisterStreamAPIServer ¶
func RegisterStreamAPIServer(s *grpc.Server, srv StreamAPIServer)
Types ¶
type ConsumeRequest ¶
type ConsumeRequest struct {
// ApplicationKey is the identity key of the application to consume from.
ApplicationKey string `protobuf:"bytes,1,opt,name=application_key,json=applicationKey,proto3" json:"application_key,omitempty"`
// EventTypes is a list of event types to be consumed.
EventTypes []*EventType `protobuf:"bytes,2,rep,name=event_types,json=eventTypes,proto3" json:"event_types,omitempty"`
// StartPoint specifies the point within the stream to start consuming.
//
// Types that are assignable to StartPoint:
// *ConsumeRequest_Offset
StartPoint isConsumeRequest_StartPoint `protobuf_oneof:"start_point"`
// contains filtered or unexported fields
}
func (*ConsumeRequest) Descriptor
deprecated
func (*ConsumeRequest) Descriptor() ([]byte, []int)
Deprecated: Use ConsumeRequest.ProtoReflect.Descriptor instead.
func (*ConsumeRequest) GetApplicationKey ¶
func (x *ConsumeRequest) GetApplicationKey() string
func (*ConsumeRequest) GetEventTypes ¶
func (x *ConsumeRequest) GetEventTypes() []*EventType
func (*ConsumeRequest) GetOffset ¶
func (x *ConsumeRequest) GetOffset() uint64
func (*ConsumeRequest) GetStartPoint ¶
func (m *ConsumeRequest) GetStartPoint() isConsumeRequest_StartPoint
func (*ConsumeRequest) ProtoMessage ¶
func (*ConsumeRequest) ProtoMessage()
func (*ConsumeRequest) ProtoReflect ¶
func (x *ConsumeRequest) ProtoReflect() protoreflect.Message
func (*ConsumeRequest) Reset ¶
func (x *ConsumeRequest) Reset()
func (*ConsumeRequest) String ¶
func (x *ConsumeRequest) String() string
type ConsumeRequest_Offset ¶
type ConsumeRequest_Offset struct {
// Offset is the offset of the earliest message to be consumed.
//
// The offset of the message returned will be greater than this value if the
// event at that offset is not one of the requested event types.
Offset uint64 `protobuf:"varint,3,opt,name=offset,proto3,oneof"`
}
type ConsumeResponse ¶
type ConsumeResponse struct {
// Offset is the offset of the message.
Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
// Envelope is the envelope containing the event.
Envelope *envelopespec.Envelope `protobuf:"bytes,2,opt,name=envelope,proto3" json:"envelope,omitempty"`
// contains filtered or unexported fields
}
func (*ConsumeResponse) Descriptor
deprecated
func (*ConsumeResponse) Descriptor() ([]byte, []int)
Deprecated: Use ConsumeResponse.ProtoReflect.Descriptor instead.
func (*ConsumeResponse) GetEnvelope ¶
func (x *ConsumeResponse) GetEnvelope() *envelopespec.Envelope
func (*ConsumeResponse) GetOffset ¶
func (x *ConsumeResponse) GetOffset() uint64
func (*ConsumeResponse) ProtoMessage ¶
func (*ConsumeResponse) ProtoMessage()
func (*ConsumeResponse) ProtoReflect ¶
func (x *ConsumeResponse) ProtoReflect() protoreflect.Message
func (*ConsumeResponse) Reset ¶
func (x *ConsumeResponse) Reset()
func (*ConsumeResponse) String ¶
func (x *ConsumeResponse) String() string
type EventType ¶
type EventType struct {
// PortableName is a name that uniquely identifies the event type across
// process boundaries.
PortableName string `protobuf:"bytes,1,opt,name=portable_name,json=portableName,proto3" json:"portable_name,omitempty"`
// MediaTypes is the set of supported media-types that can be used to
// represents events of this type, in order of preference.
MediaTypes []string `protobuf:"bytes,2,rep,name=media_types,json=mediaTypes,proto3" json:"media_types,omitempty"`
// contains filtered or unexported fields
}
func (*EventType) Descriptor
deprecated
func (*EventType) GetMediaTypes ¶
func (*EventType) GetPortableName ¶
func (*EventType) ProtoMessage ¶
func (*EventType) ProtoMessage()
func (*EventType) ProtoReflect ¶
func (x *EventType) ProtoReflect() protoreflect.Message
type EventTypesRequest ¶
type EventTypesRequest struct {
// contains filtered or unexported fields
}
func (*EventTypesRequest) Descriptor
deprecated
func (*EventTypesRequest) Descriptor() ([]byte, []int)
Deprecated: Use EventTypesRequest.ProtoReflect.Descriptor instead.
func (*EventTypesRequest) ProtoMessage ¶
func (*EventTypesRequest) ProtoMessage()
func (*EventTypesRequest) ProtoReflect ¶
func (x *EventTypesRequest) ProtoReflect() protoreflect.Message
func (*EventTypesRequest) Reset ¶
func (x *EventTypesRequest) Reset()
func (*EventTypesRequest) String ¶
func (x *EventTypesRequest) String() string
type EventTypesResponse ¶
type EventTypesResponse struct {
// EventTypes is a list of event types supported by the server.
EventTypes []*EventType `protobuf:"bytes,1,rep,name=event_types,json=eventTypes,proto3" json:"event_types,omitempty"`
// contains filtered or unexported fields
}
func (*EventTypesResponse) Descriptor
deprecated
func (*EventTypesResponse) Descriptor() ([]byte, []int)
Deprecated: Use EventTypesResponse.ProtoReflect.Descriptor instead.
func (*EventTypesResponse) GetEventTypes ¶
func (x *EventTypesResponse) GetEventTypes() []*EventType
func (*EventTypesResponse) ProtoMessage ¶
func (*EventTypesResponse) ProtoMessage()
func (*EventTypesResponse) ProtoReflect ¶
func (x *EventTypesResponse) ProtoReflect() protoreflect.Message
func (*EventTypesResponse) Reset ¶
func (x *EventTypesResponse) Reset()
func (*EventTypesResponse) String ¶
func (x *EventTypesResponse) String() string
type NoRecognizedMediaTypes ¶
type NoRecognizedMediaTypes struct {
// PortableName is a name that uniquely identifies the event type across
// process boundaries.
PortableName string `protobuf:"bytes,2,opt,name=portable_name,json=portableName,proto3" json:"portable_name,omitempty"`
// contains filtered or unexported fields
}
NoRecognizedMediaTypes is an error-details value for INVALID_ARGUMENT errors that occurred because a client requested that events of a specific type be encoded using media-types that are not recognized by the server.
func (*NoRecognizedMediaTypes) Descriptor
deprecated
func (*NoRecognizedMediaTypes) Descriptor() ([]byte, []int)
Deprecated: Use NoRecognizedMediaTypes.ProtoReflect.Descriptor instead.
func (*NoRecognizedMediaTypes) GetPortableName ¶
func (x *NoRecognizedMediaTypes) GetPortableName() string
func (*NoRecognizedMediaTypes) ProtoMessage ¶
func (*NoRecognizedMediaTypes) ProtoMessage()
func (*NoRecognizedMediaTypes) ProtoReflect ¶
func (x *NoRecognizedMediaTypes) ProtoReflect() protoreflect.Message
func (*NoRecognizedMediaTypes) Reset ¶
func (x *NoRecognizedMediaTypes) Reset()
func (*NoRecognizedMediaTypes) String ¶
func (x *NoRecognizedMediaTypes) String() string
type StreamAPIClient ¶
type StreamAPIClient interface {
// Consume starts consuming from a particular "start point" within an
// application's event stream.
//
// The start point can be specified using different mechanisms. If the server
// does not support the requested mechanism it MUST return an UNIMPLEMENTED
// error with an attached UnimplementedStartPointMechanism value.
//
// If the requested start point is beyond the end of the application's event
// stream, the server SHOULD keep the stream open and send new events as they
// are produced.
//
// If the server does not host the application specified in the request, it
// MUST return a NOT_FOUND error with an attached UnrecognizedApplication
// value.
//
// If any of the requested event types are not produced by the specified
// application the server MUST return an INVALID_ARGUMENT error with an
// attached UnrecognizedEventType value for each unrecognized event type.
//
// If none of the requested media-types for a given event type are supported
// the server MUST return an INVALID_ARGUMENT error with an attached
// NoRecognizedMediaTypes value for each such event type.
Consume(ctx context.Context, in *ConsumeRequest, opts ...grpc.CallOption) (StreamAPI_ConsumeClient, error)
// EventTypes queries the event types that the server supports for a specific
// application.
//
// If the server does not host the application specified in the request, it
// MUST return a NOT_FOUND error with an attached UnrecognizedApplication
// value.
EventTypes(ctx context.Context, in *EventTypesRequest, opts ...grpc.CallOption) (*EventTypesResponse, error)
}
StreamAPIClient is the client API for StreamAPI service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewStreamAPIClient ¶
func NewStreamAPIClient(cc grpc.ClientConnInterface) StreamAPIClient
type StreamAPIServer ¶
type StreamAPIServer interface {
// Consume starts consuming from a particular "start point" within an
// application's event stream.
//
// The start point can be specified using different mechanisms. If the server
// does not support the requested mechanism it MUST return an UNIMPLEMENTED
// error with an attached UnimplementedStartPointMechanism value.
//
// If the requested start point is beyond the end of the application's event
// stream, the server SHOULD keep the stream open and send new events as they
// are produced.
//
// If the server does not host the application specified in the request, it
// MUST return a NOT_FOUND error with an attached UnrecognizedApplication
// value.
//
// If any of the requested event types are not produced by the specified
// application the server MUST return an INVALID_ARGUMENT error with an
// attached UnrecognizedEventType value for each unrecognized event type.
//
// If none of the requested media-types for a given event type are supported
// the server MUST return an INVALID_ARGUMENT error with an attached
// NoRecognizedMediaTypes value for each such event type.
Consume(*ConsumeRequest, StreamAPI_ConsumeServer) error
// EventTypes queries the event types that the server supports for a specific
// application.
//
// If the server does not host the application specified in the request, it
// MUST return a NOT_FOUND error with an attached UnrecognizedApplication
// value.
EventTypes(context.Context, *EventTypesRequest) (*EventTypesResponse, error)
}
StreamAPIServer is the server API for StreamAPI service.
type StreamAPI_ConsumeClient ¶
type StreamAPI_ConsumeClient interface {
Recv() (*ConsumeResponse, error)
grpc.ClientStream
}
type StreamAPI_ConsumeServer ¶
type StreamAPI_ConsumeServer interface {
Send(*ConsumeResponse) error
grpc.ServerStream
}
type UnimplementedStartPointMechanism ¶
type UnimplementedStartPointMechanism struct {
// contains filtered or unexported fields
}
UnimplementedStartPointMechanism is an error-details value for UNIMPLEMENTED errors that occurred because a client started consuming using a start point mechanism that is not implemented by the server.
func (*UnimplementedStartPointMechanism) Descriptor
deprecated
func (*UnimplementedStartPointMechanism) Descriptor() ([]byte, []int)
Deprecated: Use UnimplementedStartPointMechanism.ProtoReflect.Descriptor instead.
func (*UnimplementedStartPointMechanism) ProtoMessage ¶
func (*UnimplementedStartPointMechanism) ProtoMessage()
func (*UnimplementedStartPointMechanism) ProtoReflect ¶
func (x *UnimplementedStartPointMechanism) ProtoReflect() protoreflect.Message
func (*UnimplementedStartPointMechanism) Reset ¶
func (x *UnimplementedStartPointMechanism) Reset()
func (*UnimplementedStartPointMechanism) String ¶
func (x *UnimplementedStartPointMechanism) String() string
type UnimplementedStreamAPIServer ¶
type UnimplementedStreamAPIServer struct {
}
UnimplementedStreamAPIServer can be embedded to have forward compatible implementations.
func (*UnimplementedStreamAPIServer) Consume ¶
func (*UnimplementedStreamAPIServer) Consume(*ConsumeRequest, StreamAPI_ConsumeServer) error
func (*UnimplementedStreamAPIServer) EventTypes ¶
func (*UnimplementedStreamAPIServer) EventTypes(context.Context, *EventTypesRequest) (*EventTypesResponse, error)
type UnrecognizedApplication ¶
type UnrecognizedApplication struct {
// ApplicationKey is the identity of the application that produced the error.
ApplicationKey string `protobuf:"bytes,1,opt,name=application_key,json=applicationKey,proto3" json:"application_key,omitempty"`
// contains filtered or unexported fields
}
UnrecognizedApplication is an error-details value for INVALID_ARGUMENT errors that occurred because a specific application key was not recognized by the server.
func (*UnrecognizedApplication) Descriptor
deprecated
func (*UnrecognizedApplication) Descriptor() ([]byte, []int)
Deprecated: Use UnrecognizedApplication.ProtoReflect.Descriptor instead.
func (*UnrecognizedApplication) GetApplicationKey ¶
func (x *UnrecognizedApplication) GetApplicationKey() string
func (*UnrecognizedApplication) ProtoMessage ¶
func (*UnrecognizedApplication) ProtoMessage()
func (*UnrecognizedApplication) ProtoReflect ¶
func (x *UnrecognizedApplication) ProtoReflect() protoreflect.Message
func (*UnrecognizedApplication) Reset ¶
func (x *UnrecognizedApplication) Reset()
func (*UnrecognizedApplication) String ¶
func (x *UnrecognizedApplication) String() string
type UnrecognizedEventType ¶
type UnrecognizedEventType struct {
// PortableName is a name that uniquely identifies the event type across
// process boundaries.
PortableName string `protobuf:"bytes,2,opt,name=portable_name,json=portableName,proto3" json:"portable_name,omitempty"`
// contains filtered or unexported fields
}
UnrecognizedEventType is an error-details value for INVALID_ARGUMENT errors that occurred because a specific event type was not recognized by the server.
func (*UnrecognizedEventType) Descriptor
deprecated
func (*UnrecognizedEventType) Descriptor() ([]byte, []int)
Deprecated: Use UnrecognizedEventType.ProtoReflect.Descriptor instead.
func (*UnrecognizedEventType) GetPortableName ¶
func (x *UnrecognizedEventType) GetPortableName() string
func (*UnrecognizedEventType) ProtoMessage ¶
func (*UnrecognizedEventType) ProtoMessage()
func (*UnrecognizedEventType) ProtoReflect ¶
func (x *UnrecognizedEventType) ProtoReflect() protoreflect.Message
func (*UnrecognizedEventType) Reset ¶
func (x *UnrecognizedEventType) Reset()
func (*UnrecognizedEventType) String ¶
func (x *UnrecognizedEventType) String() string