eventstreamgrpc

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 11 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"
)
View Source
const ConsumeEventsResponse_EventDelivery_case case_ConsumeEventsResponse_Operation = 1
View Source
const ConsumeEventsResponse_Operation_not_set_case case_ConsumeEventsResponse_Operation = 0

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 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(id *uuidpb.UUID) 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 type IDs MUST be a subset of those type IDs associated with
	// the stream, as per the result of the ListStreams operation. If any other
	// type IDs are requested the server MUST return an INVALID_ARGUMENT error
	// with an attached [UnrecognizedEventType] value for each unrecognized type
	// ID. See [UnrecognizedEventTypeError].
	//
	// If no type IDs are specified the server MUST return an INVALID_ARGUMENT
	// error with an attached [NoEventTypes] value. See [NoEventTypesError].
	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 type IDs MUST be a subset of those type IDs associated with
	// the stream, as per the result of the ListStreams operation. If any other
	// type IDs are requested the server MUST return an INVALID_ARGUMENT error
	// with an attached [UnrecognizedEventType] value for each unrecognized type
	// ID. See [UnrecognizedEventTypeError].
	//
	// If no type IDs are specified the server MUST return an INVALID_ARGUMENT
	// error with an attached [NoEventTypes] value. See [NoEventTypesError].
	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 {
	// contains filtered or unexported fields
}

ConsumeEventsRequest is the input to the ConsumeAPI.ConsumeEvents method.

func (*ConsumeEventsRequest) ClearStreamId added in v0.23.0

func (x *ConsumeEventsRequest) ClearStreamId()

func (*ConsumeEventsRequest) GetEventTypeIds added in v0.20.1

func (x *ConsumeEventsRequest) GetEventTypeIds() []*uuidpb.UUID

func (*ConsumeEventsRequest) GetOffset

func (x *ConsumeEventsRequest) GetOffset() uint64

func (*ConsumeEventsRequest) GetStreamId

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

func (*ConsumeEventsRequest) HasStreamId added in v0.23.0

func (x *ConsumeEventsRequest) HasStreamId() bool

func (*ConsumeEventsRequest) MarshalBinary added in v0.18.0

func (x *ConsumeEventsRequest) MarshalBinary() ([]byte, error)

MarshalBinary returns the binary representation of the message, equivalent to calling proto.Marshal(x).

It allows *ConsumeEventsRequest to implement encoding.BinaryMarshaler.

func (*ConsumeEventsRequest) ProtoMessage

func (*ConsumeEventsRequest) ProtoMessage()

func (*ConsumeEventsRequest) ProtoReflect

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

func (*ConsumeEventsRequest) Reset

func (x *ConsumeEventsRequest) Reset()

func (*ConsumeEventsRequest) SetEventTypeIds added in v0.20.1

func (x *ConsumeEventsRequest) SetEventTypeIds(v []*uuidpb.UUID)

func (*ConsumeEventsRequest) SetOffset

func (x *ConsumeEventsRequest) SetOffset(v uint64)

func (*ConsumeEventsRequest) SetStreamId

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

func (*ConsumeEventsRequest) String

func (x *ConsumeEventsRequest) String() string

func (*ConsumeEventsRequest) UnmarshalBinary added in v0.18.0

func (x *ConsumeEventsRequest) UnmarshalBinary(data []byte) error

UnmarshalBinary populates x from its binary representation, equivalent to calling proto.Unmarshal(data, x).

It allows *ConsumeEventsRequest to implement encoding.BinaryUnmarshaler.

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) WithEventTypeIds added in v0.20.1

WithEventTypeIds configures the builder to set the EventTypeIds 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 ConsumeEventsRequest_builder added in v0.23.0

type ConsumeEventsRequest_builder struct {

	// StreamId is the ID from which events are consumed.
	StreamId *uuidpb.UUID
	// Offset is the offset of the earliest event to be consumed.
	Offset uint64
	// EventTypeIds is a list of type IDs of the events to be consumed. The
	// consumer must be explicit about the event types that it understands; there
	// is no mechanism to request all event types.
	EventTypeIds []*uuidpb.UUID
	// contains filtered or unexported fields
}

func (ConsumeEventsRequest_builder) Build added in v0.23.0

type ConsumeEventsResponse

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

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

func (*ConsumeEventsResponse) ClearEventDelivery added in v0.23.0

func (x *ConsumeEventsResponse) ClearEventDelivery()

func (*ConsumeEventsResponse) ClearOperation added in v0.23.0

func (x *ConsumeEventsResponse) ClearOperation()

func (*ConsumeEventsResponse) GetEventDelivery

func (*ConsumeEventsResponse) HasEventDelivery added in v0.23.0

func (x *ConsumeEventsResponse) HasEventDelivery() bool

func (*ConsumeEventsResponse) HasOperation added in v0.23.0

func (x *ConsumeEventsResponse) HasOperation() bool

func (*ConsumeEventsResponse) MarshalBinary added in v0.18.0

func (x *ConsumeEventsResponse) MarshalBinary() ([]byte, error)

MarshalBinary returns the binary representation of the message, equivalent to calling proto.Marshal(x).

It allows *ConsumeEventsResponse to implement encoding.BinaryMarshaler.

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

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 the EventDelivery value if x.Operation is set to EventDelivery. Otherwise, ok is false and v is the zero-value.

func (*ConsumeEventsResponse) UnmarshalBinary added in v0.18.0

func (x *ConsumeEventsResponse) UnmarshalBinary(data []byte) error

UnmarshalBinary populates x from its binary representation, equivalent to calling proto.Unmarshal(data, x).

It allows *ConsumeEventsResponse to implement encoding.BinaryUnmarshaler.

func (*ConsumeEventsResponse) WhichOperation added in v0.23.0

func (x *ConsumeEventsResponse) WhichOperation() case_ConsumeEventsResponse_Operation

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 EventDelivery field to v, then returns b.

type ConsumeEventsResponse_EventDelivery

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

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

func (*ConsumeEventsResponse_EventDelivery) ClearEnvelope added in v0.23.0

func (x *ConsumeEventsResponse_EventDelivery) ClearEnvelope()

func (*ConsumeEventsResponse_EventDelivery) GetEnvelope

func (*ConsumeEventsResponse_EventDelivery) GetOffset

func (*ConsumeEventsResponse_EventDelivery) HasEnvelope added in v0.23.0

func (x *ConsumeEventsResponse_EventDelivery) HasEnvelope() bool

func (*ConsumeEventsResponse_EventDelivery) MarshalBinary added in v0.18.0

func (x *ConsumeEventsResponse_EventDelivery) MarshalBinary() ([]byte, error)

MarshalBinary returns the binary representation of the message, equivalent to calling proto.Marshal(x).

It allows *ConsumeEventsResponse_EventDelivery to implement encoding.BinaryMarshaler.

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

func (*ConsumeEventsResponse_EventDelivery) SetOffset added in v0.10.3

func (*ConsumeEventsResponse_EventDelivery) String

func (*ConsumeEventsResponse_EventDelivery) UnmarshalBinary added in v0.18.0

func (x *ConsumeEventsResponse_EventDelivery) UnmarshalBinary(data []byte) error

UnmarshalBinary populates x from its binary representation, equivalent to calling proto.Unmarshal(data, x).

It allows *ConsumeEventsResponse_EventDelivery to implement encoding.BinaryUnmarshaler.

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_builder added in v0.23.0

type ConsumeEventsResponse_EventDelivery_builder struct {

	// Offset is the event's offset within the stream.
	Offset uint64
	// Envelope is the envelope containing the event.
	Envelope *envelopepb.Envelope
	// contains filtered or unexported fields
}

func (ConsumeEventsResponse_EventDelivery_builder) Build added in v0.23.0

type ConsumeEventsResponse_builder added in v0.23.0

type ConsumeEventsResponse_builder struct {

	// Fields of oneof xxx_hidden_Operation:
	EventDelivery *ConsumeEventsResponse_EventDelivery
	// contains filtered or unexported fields
}

func (ConsumeEventsResponse_builder) Build added in v0.23.0

type ListStreamsRequest

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

ListStreamsRequest is the input to the ConsumeAPI.ListStreams method.

func (*ListStreamsRequest) MarshalBinary added in v0.18.0

func (x *ListStreamsRequest) MarshalBinary() ([]byte, error)

MarshalBinary returns the binary representation of the message, equivalent to calling proto.Marshal(x).

It allows *ListStreamsRequest to implement encoding.BinaryMarshaler.

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

func (*ListStreamsRequest) UnmarshalBinary added in v0.18.0

func (x *ListStreamsRequest) UnmarshalBinary(data []byte) error

UnmarshalBinary populates x from its binary representation, equivalent to calling proto.Unmarshal(data, x).

It allows *ListStreamsRequest to implement encoding.BinaryUnmarshaler.

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 ListStreamsRequest_builder added in v0.23.0

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

func (ListStreamsRequest_builder) Build added in v0.23.0

type ListStreamsResponse

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

ListStreamsResponse is the output of the ConsumeAPI.ListStreams method.

func (*ListStreamsResponse) GetStreams

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

func (*ListStreamsResponse) MarshalBinary added in v0.18.0

func (x *ListStreamsResponse) MarshalBinary() ([]byte, error)

MarshalBinary returns the binary representation of the message, equivalent to calling proto.Marshal(x).

It allows *ListStreamsResponse to implement encoding.BinaryMarshaler.

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)

func (*ListStreamsResponse) String

func (x *ListStreamsResponse) String() string

func (*ListStreamsResponse) UnmarshalBinary added in v0.18.0

func (x *ListStreamsResponse) UnmarshalBinary(data []byte) error

UnmarshalBinary populates x from its binary representation, equivalent to calling proto.Unmarshal(data, x).

It allows *ListStreamsResponse to implement encoding.BinaryUnmarshaler.

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 ListStreamsResponse_builder added in v0.23.0

type ListStreamsResponse_builder struct {

	// Streams is a list of event streams that can be consumed from this server.
	Streams []*Stream
	// contains filtered or unexported fields
}

func (ListStreamsResponse_builder) Build added in v0.23.0

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 type IDs.

func (*NoEventTypes) MarshalBinary added in v0.18.0

func (x *NoEventTypes) MarshalBinary() ([]byte, error)

MarshalBinary returns the binary representation of the message, equivalent to calling proto.Marshal(x).

It allows *NoEventTypes to implement encoding.BinaryMarshaler.

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

func (*NoEventTypes) UnmarshalBinary added in v0.18.0

func (x *NoEventTypes) UnmarshalBinary(data []byte) error

UnmarshalBinary populates x from its binary representation, equivalent to calling proto.Unmarshal(data, x).

It allows *NoEventTypes to implement encoding.BinaryUnmarshaler.

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 NoEventTypes_builder added in v0.23.0

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

func (NoEventTypes_builder) Build added in v0.23.0

func (b0 NoEventTypes_builder) Build() *NoEventTypes

type Stream

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

Stream describes an offset-based ordered event stream.

func (*Stream) ClearStreamId added in v0.23.0

func (x *Stream) ClearStreamId()

func (*Stream) GetEventTypeIds added in v0.20.1

func (x *Stream) GetEventTypeIds() []*uuidpb.UUID

func (*Stream) GetStreamId

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

func (*Stream) HasStreamId added in v0.23.0

func (x *Stream) HasStreamId() bool

func (*Stream) MarshalBinary added in v0.18.0

func (x *Stream) MarshalBinary() ([]byte, error)

MarshalBinary returns the binary representation of the message, equivalent to calling proto.Marshal(x).

It allows *Stream to implement encoding.BinaryMarshaler.

func (*Stream) ProtoMessage

func (*Stream) ProtoMessage()

func (*Stream) ProtoReflect

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

func (*Stream) Reset

func (x *Stream) Reset()

func (*Stream) SetEventTypeIds added in v0.20.1

func (x *Stream) SetEventTypeIds(v []*uuidpb.UUID)

func (*Stream) SetStreamId

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

func (*Stream) String

func (x *Stream) String() string

func (*Stream) UnmarshalBinary added in v0.18.0

func (x *Stream) UnmarshalBinary(data []byte) error

UnmarshalBinary populates x from its binary representation, equivalent to calling proto.Unmarshal(data, x).

It allows *Stream to implement encoding.BinaryUnmarshaler.

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) WithEventTypeIds added in v0.20.1

func (b *StreamBuilder) WithEventTypeIds(v []*uuidpb.UUID) *StreamBuilder

WithEventTypeIds configures the builder to set the EventTypeIds 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 Stream_builder added in v0.23.0

type Stream_builder struct {

	// StreamId is a unique identifier for the stream.
	StreamId *uuidpb.UUID
	// EventTypeIds is the set of type IDs of events that may appear on the stream.
	EventTypeIds []*uuidpb.UUID
	// contains filtered or unexported fields
}

func (Stream_builder) Build added in v0.23.0

func (b0 Stream_builder) Build() *Stream

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 {
	// 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) ClearEventTypeId added in v0.23.0

func (x *UnrecognizedEventType) ClearEventTypeId()

func (*UnrecognizedEventType) GetEventTypeId added in v0.20.1

func (x *UnrecognizedEventType) GetEventTypeId() *uuidpb.UUID

func (*UnrecognizedEventType) HasEventTypeId added in v0.23.0

func (x *UnrecognizedEventType) HasEventTypeId() bool

func (*UnrecognizedEventType) MarshalBinary added in v0.18.0

func (x *UnrecognizedEventType) MarshalBinary() ([]byte, error)

MarshalBinary returns the binary representation of the message, equivalent to calling proto.Marshal(x).

It allows *UnrecognizedEventType to implement encoding.BinaryMarshaler.

func (*UnrecognizedEventType) ProtoMessage

func (*UnrecognizedEventType) ProtoMessage()

func (*UnrecognizedEventType) ProtoReflect

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

func (*UnrecognizedEventType) Reset

func (x *UnrecognizedEventType) Reset()

func (*UnrecognizedEventType) SetEventTypeId added in v0.20.1

func (x *UnrecognizedEventType) SetEventTypeId(v *uuidpb.UUID)

func (*UnrecognizedEventType) String

func (x *UnrecognizedEventType) String() string

func (*UnrecognizedEventType) UnmarshalBinary added in v0.18.0

func (x *UnrecognizedEventType) UnmarshalBinary(data []byte) error

UnmarshalBinary populates x from its binary representation, equivalent to calling proto.Unmarshal(data, x).

It allows *UnrecognizedEventType to implement encoding.BinaryUnmarshaler.

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) WithEventTypeId added in v0.20.1

WithEventTypeId configures the builder to set the EventTypeId field to v, then returns b.

type UnrecognizedEventType_builder added in v0.23.0

type UnrecognizedEventType_builder struct {

	// EventTypeId is the ID of the unrecognized event type.
	EventTypeId *uuidpb.UUID
	// contains filtered or unexported fields
}

func (UnrecognizedEventType_builder) Build added in v0.23.0

type UnrecognizedStream

type UnrecognizedStream struct {
	// 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) ClearStreamId added in v0.23.0

func (x *UnrecognizedStream) ClearStreamId()

func (*UnrecognizedStream) GetStreamId

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

func (*UnrecognizedStream) HasStreamId added in v0.23.0

func (x *UnrecognizedStream) HasStreamId() bool

func (*UnrecognizedStream) MarshalBinary added in v0.18.0

func (x *UnrecognizedStream) MarshalBinary() ([]byte, error)

MarshalBinary returns the binary representation of the message, equivalent to calling proto.Marshal(x).

It allows *UnrecognizedStream to implement encoding.BinaryMarshaler.

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)

func (*UnrecognizedStream) String

func (x *UnrecognizedStream) String() string

func (*UnrecognizedStream) UnmarshalBinary added in v0.18.0

func (x *UnrecognizedStream) UnmarshalBinary(data []byte) error

UnmarshalBinary populates x from its binary representation, equivalent to calling proto.Unmarshal(data, x).

It allows *UnrecognizedStream to implement encoding.BinaryUnmarshaler.

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 UnrecognizedStream_builder added in v0.23.0

type UnrecognizedStream_builder struct {

	// ApplicationKey is the ID of the unrecognized stream.
	StreamId *uuidpb.UUID
	// contains filtered or unexported fields
}

func (UnrecognizedStream_builder) Build added in v0.23.0

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