eventstreamgrpc

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package eventstreamgrpc defines a gRPC service for consuming ordered streams of event messages.

Index

Constants

View Source
const (
	ConsumeAPI_ListStreams_FullMethodName   = "/dogma.eventstream.consume.v1.ConsumeAPI/ListStreams"
	ConsumeAPI_ConsumeEvents_FullMethodName = "/dogma.eventstream.consume.v1.ConsumeAPI/ConsumeEvents"
)

Variables

View Source
var ConsumeAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dogma.eventstream.consume.v1.ConsumeAPI",
	HandlerType: (*ConsumeAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListStreams",
			Handler:    _ConsumeAPI_ListStreams_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ConsumeEvents",
			Handler:       _ConsumeAPI_ConsumeEvents_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "github.com/dogmatiq/enginekit/grpc/eventstreamgrpc/consume.proto",
}

ConsumeAPI_ServiceDesc is the grpc.ServiceDesc for ConsumeAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_github_com_dogmatiq_enginekit_grpc_eventstreamgrpc_consume_proto protoreflect.FileDescriptor

Functions

func Map_ConsumeEventsResponse_Operation

func Map_ConsumeEventsResponse_Operation[T any](
	x *ConsumeEventsResponse,
	caseEventDelivery func(*ConsumeEventsResponse_EventDelivery) T,
	none func() T,
) T

Map_ConsumeEventsResponse_Operation maps x.Operation to a value of type T by invoking one of the given functions.

It invokes the function that corresponds to the value of x.Operation, and returns that function's result. It calls none() if x.Operation is nil.

func MustMap_ConsumeEventsResponse_Operation added in v0.10.3

func MustMap_ConsumeEventsResponse_Operation[T any](
	x *ConsumeEventsResponse,
	caseEventDelivery func(*ConsumeEventsResponse_EventDelivery) T,
) T

MustMap_ConsumeEventsResponse_Operation maps x.Operation to a value of type T by invoking one of the given functions.

It invokes the function that corresponds to the value of x.Operation, and returns that function's result. It panics if x.Operation is nil.

func MustSwitch_ConsumeEventsResponse_Operation added in v0.10.3

func MustSwitch_ConsumeEventsResponse_Operation(
	x *ConsumeEventsResponse,
	caseEventDelivery func(*ConsumeEventsResponse_EventDelivery),
)

MustSwitch_ConsumeEventsResponse_Operation invokes one of the given functions based on the value of x.Operation.

It panics if x.Operation is nil.

func NoEventTypesError

func NoEventTypesError() error

NoEventTypesError returns an error indicating that the that the client made a consume request without specifying any event types.

func NoRecognizedMediaTypesError

func NoRecognizedMediaTypesError(portableName string) error

NoRecognizedMediaTypesError returns an error indicating that the server does not support any of the requested media-types for the given event type.

func RegisterConsumeAPIServer

func RegisterConsumeAPIServer(s grpc.ServiceRegistrar, srv ConsumeAPIServer)

func Switch_ConsumeEventsResponse_Operation

func Switch_ConsumeEventsResponse_Operation(
	x *ConsumeEventsResponse,
	caseEventDelivery func(*ConsumeEventsResponse_EventDelivery),
	none func(),
)

Switch_ConsumeEventsResponse_Operation invokes one of the given functions based on the value of x.Operation.

It calls none() if x.Operation is nil.

func UnrecognizedEventTypeError

func UnrecognizedEventTypeError(portableName string) error

UnrecognizedEventTypeError returns an error indicating that the given event type is not recognized by the server.

func UnrecognizedStreamError

func UnrecognizedStreamError(id *uuidpb.UUID) error

UnrecognizedStreamError returns an error indicating that the given stream is not recognized by the server.

Types

type ConsumeAPIClient

type ConsumeAPIClient interface {
	// ListStreams lists the streams that the server provides.
	ListStreams(ctx context.Context, in *ListStreamsRequest, opts ...grpc.CallOption) (*ListStreamsResponse, error)
	// Consume starts consuming from a specific offset within an event stream.
	//
	// If the requested stream ID is unknown to the server it MUST return a
	// NOT_FOUND error with an attached [UnrecognizedStream] value. See
	// [UnrecognizedStreamError].
	//
	// If the requested offset is beyond the end of the stream, the server SHOULD
	// keep the stream open and send new events as they are written to the stream.
	//
	// The requested event types MUST be a subset of those event types associated
	// with the stream, as per the result of the ListStreams operation. If any
	// other event types are requested the server MUST return an INVALID_ARGUMENT
	// error with an attached [UnrecognizedEventType] value for each unrecognized
	// event type. See [UnrecognizedEventTypeError].
	//
	// If no types are specified the server MUST return an INVALID_ARGUMENT error
	// with an attached [NoEventTypes] value. See [NoEventTypesError].
	//
	// 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. See
	// [NoRecognizedMediaTypesError].
	ConsumeEvents(ctx context.Context, in *ConsumeEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ConsumeEventsResponse], error)
}

ConsumeAPIClient is the client API for ConsumeAPI 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.

ConsumeAPI is a service for consuming events from an offset-based ordered stream.

func NewConsumeAPIClient

func NewConsumeAPIClient(cc grpc.ClientConnInterface) ConsumeAPIClient

type ConsumeAPIClientStub added in v0.10.3

type ConsumeAPIClientStub struct {
	// ListStreamsFunc is a function that implements the ListStreams RPC method.
	ListStreamsFunc func(ctx context.Context, req *ListStreamsRequest, options ...grpc.CallOption) (*ListStreamsResponse, error)

	// ConsumeEventsFunc is a function that implements the ConsumeEvents RPC method.
	ConsumeEventsFunc func(ctx context.Context, req *ConsumeEventsRequest, options ...grpc.CallOption) (ConsumeAPI_ConsumeEventsClient, error)
}

func (*ConsumeAPIClientStub) ConsumeEvents added in v0.10.3

ConsumeEvents calls c.ConsumeEventsFunc if it is non-nil. Otherwise, it returns an error.

func (*ConsumeAPIClientStub) ListStreams added in v0.10.3

ListStreams calls c.ListStreamsFunc if it is non-nil. Otherwise, it returns an error.

type ConsumeAPIServer

type ConsumeAPIServer interface {
	// ListStreams lists the streams that the server provides.
	ListStreams(context.Context, *ListStreamsRequest) (*ListStreamsResponse, error)
	// Consume starts consuming from a specific offset within an event stream.
	//
	// If the requested stream ID is unknown to the server it MUST return a
	// NOT_FOUND error with an attached [UnrecognizedStream] value. See
	// [UnrecognizedStreamError].
	//
	// If the requested offset is beyond the end of the stream, the server SHOULD
	// keep the stream open and send new events as they are written to the stream.
	//
	// The requested event types MUST be a subset of those event types associated
	// with the stream, as per the result of the ListStreams operation. If any
	// other event types are requested the server MUST return an INVALID_ARGUMENT
	// error with an attached [UnrecognizedEventType] value for each unrecognized
	// event type. See [UnrecognizedEventTypeError].
	//
	// If no types are specified the server MUST return an INVALID_ARGUMENT error
	// with an attached [NoEventTypes] value. See [NoEventTypesError].
	//
	// 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. See
	// [NoRecognizedMediaTypesError].
	ConsumeEvents(*ConsumeEventsRequest, grpc.ServerStreamingServer[ConsumeEventsResponse]) error
}

ConsumeAPIServer is the server API for ConsumeAPI service. All implementations should embed UnimplementedConsumeAPIServer for forward compatibility.

ConsumeAPI is a service for consuming events from an offset-based ordered stream.

type ConsumeAPI_ConsumeEventsClient

type ConsumeAPI_ConsumeEventsClient = grpc.ServerStreamingClient[ConsumeEventsResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ConsumeAPI_ConsumeEventsServer

type ConsumeAPI_ConsumeEventsServer = grpc.ServerStreamingServer[ConsumeEventsResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ConsumeEventsRequest

type ConsumeEventsRequest struct {

	// StreamId is the ID from which events are consumed.
	StreamId *uuidpb.UUID `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	// Offset is the offset of the earliest event to be consumed.
	Offset uint64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// EventTypes is a list of event types to be consumed. The consumer must be
	// explicit about the event types that it understands; there is no mechanism
	// to request all event types.
	EventTypes []*EventType `protobuf:"bytes,3,rep,name=event_types,json=eventTypes,proto3" json:"event_types,omitempty"`
	// contains filtered or unexported fields
}

ConsumeEventsRequest is the input to the ConsumeAPI.ConsumeEvents method.

func (*ConsumeEventsRequest) Descriptor deprecated

func (*ConsumeEventsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ConsumeEventsRequest.ProtoReflect.Descriptor instead.

func (*ConsumeEventsRequest) GetEventTypes

func (x *ConsumeEventsRequest) GetEventTypes() []*EventType

func (*ConsumeEventsRequest) GetOffset

func (x *ConsumeEventsRequest) GetOffset() uint64

func (*ConsumeEventsRequest) GetStreamId

func (x *ConsumeEventsRequest) GetStreamId() *uuidpb.UUID

func (*ConsumeEventsRequest) ProtoMessage

func (*ConsumeEventsRequest) ProtoMessage()

func (*ConsumeEventsRequest) ProtoReflect

func (x *ConsumeEventsRequest) ProtoReflect() protoreflect.Message

func (*ConsumeEventsRequest) Reset

func (x *ConsumeEventsRequest) Reset()

func (*ConsumeEventsRequest) SetEventTypes

func (x *ConsumeEventsRequest) SetEventTypes(v []*EventType)

SetEventTypes sets the x.EventTypes field to v, then returns x.

func (*ConsumeEventsRequest) SetOffset

func (x *ConsumeEventsRequest) SetOffset(v uint64)

SetOffset sets the x.Offset field to v, then returns x.

func (*ConsumeEventsRequest) SetStreamId

func (x *ConsumeEventsRequest) SetStreamId(v *uuidpb.UUID)

SetStreamId sets the x.StreamId field to v, then returns x.

func (*ConsumeEventsRequest) String

func (x *ConsumeEventsRequest) String() string

type ConsumeEventsRequestBuilder

type ConsumeEventsRequestBuilder struct {
	// contains filtered or unexported fields
}

func NewConsumeEventsRequestBuilder

func NewConsumeEventsRequestBuilder() *ConsumeEventsRequestBuilder

NewConsumeEventsRequestBuilder returns a builder that constructs ConsumeEventsRequest messages.

func (*ConsumeEventsRequestBuilder) Build

Build returns a new ConsumeEventsRequest containing the values configured via the builder.

Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.

func (*ConsumeEventsRequestBuilder) From

From configures the builder to use x as the prototype for new messages, then returns b.

It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.

func (*ConsumeEventsRequestBuilder) WithEventTypes

WithEventTypes configures the builder to set the EventTypes field to v, then returns b.

func (*ConsumeEventsRequestBuilder) WithOffset

WithOffset configures the builder to set the Offset field to v, then returns b.

func (*ConsumeEventsRequestBuilder) WithStreamId

WithStreamId configures the builder to set the StreamId field to v, then returns b.

type ConsumeEventsResponse

type ConsumeEventsResponse struct {

	// Types that are assignable to Operation:
	//
	//	*ConsumeEventsResponse_EventDelivery_
	Operation isConsumeEventsResponse_Operation `protobuf_oneof:"operation"`
	// contains filtered or unexported fields
}

ConsumeResponse is the (streaming) output of the ConsumeAPI.ConsumeEvents method.

func (*ConsumeEventsResponse) Descriptor deprecated

func (*ConsumeEventsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ConsumeEventsResponse.ProtoReflect.Descriptor instead.

func (*ConsumeEventsResponse) GetEventDelivery

func (*ConsumeEventsResponse) GetOperation

func (m *ConsumeEventsResponse) GetOperation() isConsumeEventsResponse_Operation

func (*ConsumeEventsResponse) ProtoMessage

func (*ConsumeEventsResponse) ProtoMessage()

func (*ConsumeEventsResponse) ProtoReflect

func (x *ConsumeEventsResponse) ProtoReflect() protoreflect.Message

func (*ConsumeEventsResponse) Reset

func (x *ConsumeEventsResponse) Reset()

func (*ConsumeEventsResponse) SetEventDelivery

SetEventDelivery sets the x.Operation field to a ConsumeEventsResponse_EventDelivery_ value containing v, then returns x.

func (*ConsumeEventsResponse) String

func (x *ConsumeEventsResponse) String() string

func (*ConsumeEventsResponse) TryGetEventDelivery added in v0.10.3

func (x *ConsumeEventsResponse) TryGetEventDelivery() (v *ConsumeEventsResponse_EventDelivery, ok bool)

TryGetEventDelivery returns x.Operation.EventDelivery if x.Operation is a ConsumeEventsResponse_EventDelivery_. Otherwise, ok is false and v is the zero-value.

type ConsumeEventsResponseBuilder

type ConsumeEventsResponseBuilder struct {
	// contains filtered or unexported fields
}

func NewConsumeEventsResponseBuilder

func NewConsumeEventsResponseBuilder() *ConsumeEventsResponseBuilder

NewConsumeEventsResponseBuilder returns a builder that constructs ConsumeEventsResponse messages.

func (*ConsumeEventsResponseBuilder) Build

Build returns a new ConsumeEventsResponse containing the values configured via the builder.

Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.

func (*ConsumeEventsResponseBuilder) From

From configures the builder to use x as the prototype for new messages, then returns b.

It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.

func (*ConsumeEventsResponseBuilder) WithEventDelivery

WithEventDelivery configures the builder to set the Operation field to a ConsumeEventsResponse_EventDelivery_ value containing v, then returns b

type ConsumeEventsResponse_EventDelivery

type ConsumeEventsResponse_EventDelivery struct {

	// Offset is the event's offset within the stream.
	Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
	// Envelope is the envelope containing the event.
	Envelope *envelopepb.Envelope `protobuf:"bytes,2,opt,name=envelope,proto3" json:"envelope,omitempty"`
	// contains filtered or unexported fields
}

EventDelivery represents the delivery of a single event to the consumer.

func (*ConsumeEventsResponse_EventDelivery) Descriptor deprecated

func (*ConsumeEventsResponse_EventDelivery) Descriptor() ([]byte, []int)

Deprecated: Use ConsumeEventsResponse_EventDelivery.ProtoReflect.Descriptor instead.

func (*ConsumeEventsResponse_EventDelivery) GetEnvelope

func (*ConsumeEventsResponse_EventDelivery) GetOffset

func (*ConsumeEventsResponse_EventDelivery) ProtoMessage

func (*ConsumeEventsResponse_EventDelivery) ProtoMessage()

func (*ConsumeEventsResponse_EventDelivery) ProtoReflect

func (*ConsumeEventsResponse_EventDelivery) Reset

func (*ConsumeEventsResponse_EventDelivery) SetEnvelope added in v0.10.3

SetEnvelope sets the x.Envelope field to v, then returns x.

func (*ConsumeEventsResponse_EventDelivery) SetOffset added in v0.10.3

SetOffset sets the x.Offset field to v, then returns x.

func (*ConsumeEventsResponse_EventDelivery) String

type ConsumeEventsResponse_EventDeliveryBuilder added in v0.10.3

type ConsumeEventsResponse_EventDeliveryBuilder struct {
	// contains filtered or unexported fields
}

func NewConsumeEventsResponse_EventDeliveryBuilder added in v0.10.3

func NewConsumeEventsResponse_EventDeliveryBuilder() *ConsumeEventsResponse_EventDeliveryBuilder

NewConsumeEventsResponse_EventDeliveryBuilder returns a builder that constructs ConsumeEventsResponse_EventDelivery messages.

func (*ConsumeEventsResponse_EventDeliveryBuilder) Build added in v0.10.3

Build returns a new ConsumeEventsResponse_EventDelivery containing the values configured via the builder.

Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.

func (*ConsumeEventsResponse_EventDeliveryBuilder) From added in v0.10.3

From configures the builder to use x as the prototype for new messages, then returns b.

It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.

func (*ConsumeEventsResponse_EventDeliveryBuilder) WithEnvelope added in v0.10.3

WithEnvelope configures the builder to set the Envelope field to v, then returns b.

func (*ConsumeEventsResponse_EventDeliveryBuilder) WithOffset added in v0.10.3

WithOffset configures the builder to set the Offset field to v, then returns b.

type ConsumeEventsResponse_EventDelivery_

type ConsumeEventsResponse_EventDelivery_ struct {
	EventDelivery *ConsumeEventsResponse_EventDelivery `protobuf:"bytes,1,opt,name=event_delivery,json=eventDelivery,proto3,oneof"`
}

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
	// represent 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
}

EventType describes a type of event that may appear on a stream.

func (*EventType) Descriptor deprecated

func (*EventType) Descriptor() ([]byte, []int)

Deprecated: Use EventType.ProtoReflect.Descriptor instead.

func (*EventType) GetMediaTypes

func (x *EventType) GetMediaTypes() []string

func (*EventType) GetPortableName

func (x *EventType) GetPortableName() string

func (*EventType) ProtoMessage

func (*EventType) ProtoMessage()

func (*EventType) ProtoReflect

func (x *EventType) ProtoReflect() protoreflect.Message

func (*EventType) Reset

func (x *EventType) Reset()

func (*EventType) SetMediaTypes

func (x *EventType) SetMediaTypes(v []string)

SetMediaTypes sets the x.MediaTypes field to v, then returns x.

func (*EventType) SetPortableName

func (x *EventType) SetPortableName(v string)

SetPortableName sets the x.PortableName field to v, then returns x.

func (*EventType) String

func (x *EventType) String() string

type EventTypeBuilder

type EventTypeBuilder struct {
	// contains filtered or unexported fields
}

func NewEventTypeBuilder

func NewEventTypeBuilder() *EventTypeBuilder

NewEventTypeBuilder returns a builder that constructs EventType messages.

func (*EventTypeBuilder) Build

func (b *EventTypeBuilder) Build() *EventType

Build returns a new EventType containing the values configured via the builder.

Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.

func (*EventTypeBuilder) From

From configures the builder to use x as the prototype for new messages, then returns b.

It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.

func (*EventTypeBuilder) WithMediaTypes

func (b *EventTypeBuilder) WithMediaTypes(v []string) *EventTypeBuilder

WithMediaTypes configures the builder to set the MediaTypes field to v, then returns b.

func (*EventTypeBuilder) WithPortableName

func (b *EventTypeBuilder) WithPortableName(v string) *EventTypeBuilder

WithPortableName configures the builder to set the PortableName field to v, then returns b.

type ListStreamsRequest

type ListStreamsRequest struct {
	// contains filtered or unexported fields
}

ListStreamsRequest is the input to the ConsumeAPI.ListStreams method.

func (*ListStreamsRequest) Descriptor deprecated

func (*ListStreamsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListStreamsRequest.ProtoReflect.Descriptor instead.

func (*ListStreamsRequest) ProtoMessage

func (*ListStreamsRequest) ProtoMessage()

func (*ListStreamsRequest) ProtoReflect

func (x *ListStreamsRequest) ProtoReflect() protoreflect.Message

func (*ListStreamsRequest) Reset

func (x *ListStreamsRequest) Reset()

func (*ListStreamsRequest) String

func (x *ListStreamsRequest) String() string

type ListStreamsRequestBuilder

type ListStreamsRequestBuilder struct {
	// contains filtered or unexported fields
}

func NewListStreamsRequestBuilder

func NewListStreamsRequestBuilder() *ListStreamsRequestBuilder

NewListStreamsRequestBuilder returns a builder that constructs ListStreamsRequest messages.

func (*ListStreamsRequestBuilder) Build

Build returns a new ListStreamsRequest containing the values configured via the builder.

Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.

func (*ListStreamsRequestBuilder) From

From configures the builder to use x as the prototype for new messages, then returns b.

It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.

type ListStreamsResponse

type ListStreamsResponse struct {

	// Streams is a list of event streams that can be consumed from this server.
	Streams []*Stream `protobuf:"bytes,1,rep,name=streams,proto3" json:"streams,omitempty"`
	// contains filtered or unexported fields
}

ListStreamsResponse is the output of the ConsumeAPI.ListStreams method.

func (*ListStreamsResponse) Descriptor deprecated

func (*ListStreamsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListStreamsResponse.ProtoReflect.Descriptor instead.

func (*ListStreamsResponse) GetStreams

func (x *ListStreamsResponse) GetStreams() []*Stream

func (*ListStreamsResponse) ProtoMessage

func (*ListStreamsResponse) ProtoMessage()

func (*ListStreamsResponse) ProtoReflect

func (x *ListStreamsResponse) ProtoReflect() protoreflect.Message

func (*ListStreamsResponse) Reset

func (x *ListStreamsResponse) Reset()

func (*ListStreamsResponse) SetStreams

func (x *ListStreamsResponse) SetStreams(v []*Stream)

SetStreams sets the x.Streams field to v, then returns x.

func (*ListStreamsResponse) String

func (x *ListStreamsResponse) String() string

type ListStreamsResponseBuilder

type ListStreamsResponseBuilder struct {
	// contains filtered or unexported fields
}

func NewListStreamsResponseBuilder

func NewListStreamsResponseBuilder() *ListStreamsResponseBuilder

NewListStreamsResponseBuilder returns a builder that constructs ListStreamsResponse messages.

func (*ListStreamsResponseBuilder) Build

Build returns a new ListStreamsResponse containing the values configured via the builder.

Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.

func (*ListStreamsResponseBuilder) From

From configures the builder to use x as the prototype for new messages, then returns b.

It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.

func (*ListStreamsResponseBuilder) WithStreams

WithStreams configures the builder to set the Streams field to v, then returns b.

type NoEventTypes

type NoEventTypes struct {
	// contains filtered or unexported fields
}

NoEventTypes is an error-details value for INVALID_ARGUMENT errors that occurred because a client sent a consume request without specifying any event types.

func (*NoEventTypes) Descriptor deprecated

func (*NoEventTypes) Descriptor() ([]byte, []int)

Deprecated: Use NoEventTypes.ProtoReflect.Descriptor instead.

func (*NoEventTypes) ProtoMessage

func (*NoEventTypes) ProtoMessage()

func (*NoEventTypes) ProtoReflect

func (x *NoEventTypes) ProtoReflect() protoreflect.Message

func (*NoEventTypes) Reset

func (x *NoEventTypes) Reset()

func (*NoEventTypes) String

func (x *NoEventTypes) String() string

type NoEventTypesBuilder

type NoEventTypesBuilder struct {
	// contains filtered or unexported fields
}

func NewNoEventTypesBuilder

func NewNoEventTypesBuilder() *NoEventTypesBuilder

NewNoEventTypesBuilder returns a builder that constructs NoEventTypes messages.

func (*NoEventTypesBuilder) Build

func (b *NoEventTypesBuilder) Build() *NoEventTypes

Build returns a new NoEventTypes containing the values configured via the builder.

Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.

func (*NoEventTypesBuilder) From

From configures the builder to use x as the prototype for new messages, then returns b.

It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.

type NoRecognizedMediaTypes

type NoRecognizedMediaTypes 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"`
	// contains filtered or unexported fields
}

NoRecognizedMediaTypes is an error-details value for INVALID_ARGUMENT errors that occurred because a the server does not support any of the media-types requested by the client for a specific event type.

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) SetPortableName

func (x *NoRecognizedMediaTypes) SetPortableName(v string)

SetPortableName sets the x.PortableName field to v, then returns x.

func (*NoRecognizedMediaTypes) String

func (x *NoRecognizedMediaTypes) String() string

type NoRecognizedMediaTypesBuilder

type NoRecognizedMediaTypesBuilder struct {
	// contains filtered or unexported fields
}

func NewNoRecognizedMediaTypesBuilder

func NewNoRecognizedMediaTypesBuilder() *NoRecognizedMediaTypesBuilder

NewNoRecognizedMediaTypesBuilder returns a builder that constructs NoRecognizedMediaTypes messages.

func (*NoRecognizedMediaTypesBuilder) Build

Build returns a new NoRecognizedMediaTypes containing the values configured via the builder.

Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.

func (*NoRecognizedMediaTypesBuilder) From

From configures the builder to use x as the prototype for new messages, then returns b.

It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.

func (*NoRecognizedMediaTypesBuilder) WithPortableName

WithPortableName configures the builder to set the PortableName field to v, then returns b.

type Stream

type Stream struct {

	// StreamId is a unique identifier for the stream.
	StreamId *uuidpb.UUID `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	// EventTypes is the set of event types that may appear on the stream.
	EventTypes []*EventType `protobuf:"bytes,2,rep,name=event_types,json=eventTypes,proto3" json:"event_types,omitempty"`
	// contains filtered or unexported fields
}

Stream describes an offset-based ordered event stream.

func (*Stream) Descriptor deprecated

func (*Stream) Descriptor() ([]byte, []int)

Deprecated: Use Stream.ProtoReflect.Descriptor instead.

func (*Stream) GetEventTypes

func (x *Stream) GetEventTypes() []*EventType

func (*Stream) GetStreamId

func (x *Stream) GetStreamId() *uuidpb.UUID

func (*Stream) ProtoMessage

func (*Stream) ProtoMessage()

func (*Stream) ProtoReflect

func (x *Stream) ProtoReflect() protoreflect.Message

func (*Stream) Reset

func (x *Stream) Reset()

func (*Stream) SetEventTypes

func (x *Stream) SetEventTypes(v []*EventType)

SetEventTypes sets the x.EventTypes field to v, then returns x.

func (*Stream) SetStreamId

func (x *Stream) SetStreamId(v *uuidpb.UUID)

SetStreamId sets the x.StreamId field to v, then returns x.

func (*Stream) String

func (x *Stream) String() string

type StreamBuilder

type StreamBuilder struct {
	// contains filtered or unexported fields
}

func NewStreamBuilder

func NewStreamBuilder() *StreamBuilder

NewStreamBuilder returns a builder that constructs Stream messages.

func (*StreamBuilder) Build

func (b *StreamBuilder) Build() *Stream

Build returns a new Stream containing the values configured via the builder.

Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.

func (*StreamBuilder) From

func (b *StreamBuilder) From(x *Stream) *StreamBuilder

From configures the builder to use x as the prototype for new messages, then returns b.

It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.

func (*StreamBuilder) WithEventTypes

func (b *StreamBuilder) WithEventTypes(v []*EventType) *StreamBuilder

WithEventTypes configures the builder to set the EventTypes field to v, then returns b.

func (*StreamBuilder) WithStreamId

func (b *StreamBuilder) WithStreamId(v *uuidpb.UUID) *StreamBuilder

WithStreamId configures the builder to set the StreamId field to v, then returns b.

type UnimplementedConsumeAPIServer

type UnimplementedConsumeAPIServer struct{}

UnimplementedConsumeAPIServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedConsumeAPIServer) ListStreams

type UnrecognizedEventType

type UnrecognizedEventType 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"`
	// 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) SetPortableName

func (x *UnrecognizedEventType) SetPortableName(v string)

SetPortableName sets the x.PortableName field to v, then returns x.

func (*UnrecognizedEventType) String

func (x *UnrecognizedEventType) String() string

type UnrecognizedEventTypeBuilder

type UnrecognizedEventTypeBuilder struct {
	// contains filtered or unexported fields
}

func NewUnrecognizedEventTypeBuilder

func NewUnrecognizedEventTypeBuilder() *UnrecognizedEventTypeBuilder

NewUnrecognizedEventTypeBuilder returns a builder that constructs UnrecognizedEventType messages.

func (*UnrecognizedEventTypeBuilder) Build

Build returns a new UnrecognizedEventType containing the values configured via the builder.

Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.

func (*UnrecognizedEventTypeBuilder) From

From configures the builder to use x as the prototype for new messages, then returns b.

It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.

func (*UnrecognizedEventTypeBuilder) WithPortableName

WithPortableName configures the builder to set the PortableName field to v, then returns b.

type UnrecognizedStream

type UnrecognizedStream struct {

	// ApplicationKey is the ID of the unrecognized stream.
	StreamId *uuidpb.UUID `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	// contains filtered or unexported fields
}

UnrecognizedStream is an error-details value for INVALID_ARGUMENT errors that occurred because a consumer requested an unrecognized stream ID.

func (*UnrecognizedStream) Descriptor deprecated

func (*UnrecognizedStream) Descriptor() ([]byte, []int)

Deprecated: Use UnrecognizedStream.ProtoReflect.Descriptor instead.

func (*UnrecognizedStream) GetStreamId

func (x *UnrecognizedStream) GetStreamId() *uuidpb.UUID

func (*UnrecognizedStream) ProtoMessage

func (*UnrecognizedStream) ProtoMessage()

func (*UnrecognizedStream) ProtoReflect

func (x *UnrecognizedStream) ProtoReflect() protoreflect.Message

func (*UnrecognizedStream) Reset

func (x *UnrecognizedStream) Reset()

func (*UnrecognizedStream) SetStreamId

func (x *UnrecognizedStream) SetStreamId(v *uuidpb.UUID)

SetStreamId sets the x.StreamId field to v, then returns x.

func (*UnrecognizedStream) String

func (x *UnrecognizedStream) String() string

type UnrecognizedStreamBuilder

type UnrecognizedStreamBuilder struct {
	// contains filtered or unexported fields
}

func NewUnrecognizedStreamBuilder

func NewUnrecognizedStreamBuilder() *UnrecognizedStreamBuilder

NewUnrecognizedStreamBuilder returns a builder that constructs UnrecognizedStream messages.

func (*UnrecognizedStreamBuilder) Build

Build returns a new UnrecognizedStream containing the values configured via the builder.

Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.

func (*UnrecognizedStreamBuilder) From

From configures the builder to use x as the prototype for new messages, then returns b.

It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.

func (*UnrecognizedStreamBuilder) WithStreamId

WithStreamId configures the builder to set the StreamId field to v, then returns b.

type UnsafeConsumeAPIServer

type UnsafeConsumeAPIServer interface {
	// contains filtered or unexported methods
}

UnsafeConsumeAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConsumeAPIServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL