Documentation
¶
Index ¶
- Variables
- func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer)
- type APIClient
- type APIServer
- type API_PublishClient
- type API_PublishServer
- type API_SubscribeClient
- type API_SubscribeServer
- type DeliveryOption
- func (DeliveryOption) Descriptor() protoreflect.EnumDescriptor
- func (x DeliveryOption) Enum() *DeliveryOption
- func (DeliveryOption) EnumDescriptor() ([]byte, []int)deprecated
- func (x DeliveryOption) Number() protoreflect.EnumNumber
- func (x DeliveryOption) String() string
- func (DeliveryOption) Type() protoreflect.EnumType
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetContentType() string
- func (x *Event) GetCorrelationId() string
- func (x *Event) GetCreatedAt() *timestamp.Timestamp
- func (x *Event) GetHmacSignature() string
- func (x *Event) GetId() string
- func (x *Event) GetMetaData() map[string]string
- func (x *Event) GetPayload() *any.Any
- func (x *Event) GetSource() string
- func (x *Event) GetVersion() string
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type PublishRequest
- func (*PublishRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PublishRequest) GetCorrelationId() string
- func (x *PublishRequest) GetMetaData() map[string]string
- func (x *PublishRequest) GetPayload() *any.Any
- func (x *PublishRequest) GetRequestId() string
- func (x *PublishRequest) GetSource() string
- func (x *PublishRequest) GetTopic() string
- func (x *PublishRequest) GetVersion() string
- func (*PublishRequest) ProtoMessage()
- func (x *PublishRequest) ProtoReflect() protoreflect.Message
- func (x *PublishRequest) Reset()
- func (x *PublishRequest) String() string
- type PublishResponse
- func (*PublishResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PublishResponse) GetCorrelationId() string
- func (x *PublishResponse) GetMessageId() string
- func (x *PublishResponse) GetRequestId() string
- func (*PublishResponse) ProtoMessage()
- func (x *PublishResponse) ProtoReflect() protoreflect.Message
- func (x *PublishResponse) Reset()
- func (x *PublishResponse) String() string
- type SubscribeRequest
- func (*SubscribeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeRequest) GetDeliveryOption() DeliveryOption
- func (x *SubscribeRequest) GetDurableName() string
- func (x *SubscribeRequest) GetGroup() string
- func (x *SubscribeRequest) GetRequestId() string
- func (x *SubscribeRequest) GetStartAtDuration() *duration.Duration
- func (x *SubscribeRequest) GetStartAtSequence() uint64
- func (x *SubscribeRequest) GetStartAtTime() *timestamp.Timestamp
- func (x *SubscribeRequest) GetTopic() string
- func (*SubscribeRequest) ProtoMessage()
- func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
- func (x *SubscribeRequest) Reset()
- func (x *SubscribeRequest) String() string
- type SubscribeResponse
- func (*SubscribeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeResponse) GetContentType() string
- func (x *SubscribeResponse) GetCorrelationId() string
- func (x *SubscribeResponse) GetCreatedAt() *timestamp.Timestamp
- func (x *SubscribeResponse) GetMessageId() string
- func (x *SubscribeResponse) GetMetaData() map[string]string
- func (x *SubscribeResponse) GetPayload() *any.Any
- func (x *SubscribeResponse) GetReceivedAt() *timestamp.Timestamp
- func (x *SubscribeResponse) GetRedelivered() bool
- func (x *SubscribeResponse) GetRequestId() string
- func (x *SubscribeResponse) GetSequence() uint64
- func (x *SubscribeResponse) GetSource() string
- func (x *SubscribeResponse) GetTopic() string
- func (x *SubscribeResponse) GetVersion() string
- func (*SubscribeResponse) ProtoMessage()
- func (x *SubscribeResponse) ProtoReflect() protoreflect.Message
- func (x *SubscribeResponse) Reset()
- func (x *SubscribeResponse) String() string
- type UnimplementedAPIServer
- type UnsafeAPIServer
Constants ¶
This section is empty.
Variables ¶
var ( DeliveryOption_name = map[int32]string{ 0: "NewOnly", 1: "DeliverAllAvailable", 2: "StartAtSequence", 3: "StartAtTime", 4: "StartAtDuration", 5: "StartWithLastReceived", 6: "StartAfterLastProcessed", } DeliveryOption_value = map[string]int32{ "NewOnly": 0, "DeliverAllAvailable": 1, "StartAtSequence": 2, "StartAtTime": 3, "StartAtDuration": 4, "StartWithLastReceived": 5, "StartAfterLastProcessed": 6, } )
Enum value maps for DeliveryOption.
var ( // the topic on which message are published // so that subscribers can specify which messages they are interested in // // optional string topic = 74000; E_Topic = &file_eventinator_proto_extTypes[0] // the version of the message // so that a consuming client can differentiate // // optional string version = 74001; E_Version = &file_eventinator_proto_extTypes[1] )
Extension fields to descriptor.MessageOptions.
var API_ServiceDesc = grpc.ServiceDesc{ ServiceName: "eventinator.API", HandlerType: (*APIServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Publish", Handler: _API_Publish_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "Subscribe", Handler: _API_Subscribe_Handler, ServerStreams: true, }, }, Metadata: "api.proto", }
API_ServiceDesc is the grpc.ServiceDesc for API service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_proto protoreflect.FileDescriptor
var File_eventinator_proto protoreflect.FileDescriptor
var File_internal_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAPIServer ¶
func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer)
Types ¶
type APIClient ¶
type APIClient interface { // publish the given message Publish(ctx context.Context, opts ...grpc.CallOption) (API_PublishClient, error) // subscribe to messages (via fanout) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (API_SubscribeClient, error) }
APIClient is the client API for API 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.
func NewAPIClient ¶
func NewAPIClient(cc grpc.ClientConnInterface) APIClient
type APIServer ¶
type APIServer interface { // publish the given message Publish(API_PublishServer) error // subscribe to messages (via fanout) Subscribe(*SubscribeRequest, API_SubscribeServer) error // contains filtered or unexported methods }
APIServer is the server API for API service. All implementations must embed UnimplementedAPIServer for forward compatibility
type API_PublishClient ¶
type API_PublishClient interface { Send(*PublishRequest) error Recv() (*PublishResponse, error) grpc.ClientStream }
type API_PublishServer ¶
type API_PublishServer interface { Send(*PublishResponse) error Recv() (*PublishRequest, error) grpc.ServerStream }
type API_SubscribeClient ¶
type API_SubscribeClient interface { Recv() (*SubscribeResponse, error) grpc.ClientStream }
type API_SubscribeServer ¶
type API_SubscribeServer interface { Send(*SubscribeResponse) error grpc.ServerStream }
type DeliveryOption ¶
type DeliveryOption int32
options for the delivery of messages
const ( // only new messages since subscription started // this is the default option DeliveryOption_NewOnly DeliveryOption = 0 // use with care as delivers all messages since system epoch DeliveryOption_DeliverAllAvailable DeliveryOption = 1 // a specific message DeliveryOption_StartAtSequence DeliveryOption = 2 // messages since date/time DeliveryOption_StartAtTime DeliveryOption = 3 // messages in the last 10 minutes DeliveryOption_StartAtDuration DeliveryOption = 4 // from the last received message (1) DeliveryOption_StartWithLastReceived DeliveryOption = 5 // start after last acknowledged message (durable subscription per subscriber) DeliveryOption_StartAfterLastProcessed DeliveryOption = 6 )
func (DeliveryOption) Descriptor ¶
func (DeliveryOption) Descriptor() protoreflect.EnumDescriptor
func (DeliveryOption) Enum ¶
func (x DeliveryOption) Enum() *DeliveryOption
func (DeliveryOption) EnumDescriptor
deprecated
func (DeliveryOption) EnumDescriptor() ([]byte, []int)
Deprecated: Use DeliveryOption.Descriptor instead.
func (DeliveryOption) Number ¶
func (x DeliveryOption) Number() protoreflect.EnumNumber
func (DeliveryOption) String ¶
func (x DeliveryOption) String() string
func (DeliveryOption) Type ¶
func (DeliveryOption) Type() protoreflect.EnumType
type Event ¶
type Event struct { // unique UUID // e.g. "123e4567-e89b-12d3-a456-426655440000" Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // version // e.g. "1.0" Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // source/origin urn // e.g. "urn:system-x.org.com/service-a" Source string `protobuf:"bytes,5,opt,name=source,proto3" json:"source,omitempty"` // protocol buffer for the message payload // the "any" message embeds the message type via `type_url` and the data as byte[] Payload *any.Any `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` // correlation id for distributed tracing and tracking CorrelationId string `protobuf:"bytes,7,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"` // metadata for message, used for communicating contextual information MetaData map[string]string `` /* 173-byte string literal not displayed */ // the MIME type of the data // // this will be derived from the provided payload, taking the form // // 'application/x-protobuf; messageType="x.y.Z"' // // where the messageType is the protobuf message type (corresponds with Any#type_url) // // see https://tools.ietf.org/html/draft-rfernando-protocol-buffers-00 // https://www.charlesproxy.com/documentation/using-charles/protocol-buffers/ // and https://prometheus.io/docs/instrumenting/exposition_formats/ // ContentType string `protobuf:"bytes,9,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` // UTC time the message was created CreatedAt *timestamp.Timestamp `protobuf:"bytes,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // used to verify message for tampering HmacSignature string `protobuf:"bytes,11,opt,name=hmac_signature,json=hmacSignature,proto3" json:"hmac_signature,omitempty"` // contains filtered or unexported fields }
represents a message with generic protobuf payload this is an internal type used for storing messages i.e. messages on the backend are stored in this form
func (*Event) Descriptor
deprecated
func (*Event) GetContentType ¶
func (*Event) GetCorrelationId ¶
func (*Event) GetCreatedAt ¶
func (*Event) GetHmacSignature ¶
func (*Event) GetMetaData ¶
func (*Event) GetPayload ¶
func (*Event) GetVersion ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type PublishRequest ¶
type PublishRequest struct { // unique UUID for the request // e.g. "123e4567-e89b-12d3-a456-426655440000" RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // the topic to publish this message on Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` // the version of the message Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // source/origin urn // e.g. "urn:system-x.org.com/service-a" Source string `protobuf:"bytes,6,opt,name=source,proto3" json:"source,omitempty"` // the payload for the message Payload *any.Any `protobuf:"bytes,7,opt,name=payload,proto3" json:"payload,omitempty"` // optionally, the correlation id for distributed tracing and tracking CorrelationId string `protobuf:"bytes,8,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"` // metadata for message, used for communicating contextual information MetaData map[string]string `` /* 173-byte string literal not displayed */ // contains filtered or unexported fields }
publish request type
func (*PublishRequest) Descriptor
deprecated
func (*PublishRequest) Descriptor() ([]byte, []int)
Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.
func (*PublishRequest) GetCorrelationId ¶
func (x *PublishRequest) GetCorrelationId() string
func (*PublishRequest) GetMetaData ¶
func (x *PublishRequest) GetMetaData() map[string]string
func (*PublishRequest) GetPayload ¶
func (x *PublishRequest) GetPayload() *any.Any
func (*PublishRequest) GetRequestId ¶
func (x *PublishRequest) GetRequestId() string
func (*PublishRequest) GetSource ¶
func (x *PublishRequest) GetSource() string
func (*PublishRequest) GetTopic ¶
func (x *PublishRequest) GetTopic() string
func (*PublishRequest) GetVersion ¶
func (x *PublishRequest) GetVersion() string
func (*PublishRequest) ProtoMessage ¶
func (*PublishRequest) ProtoMessage()
func (*PublishRequest) ProtoReflect ¶
func (x *PublishRequest) ProtoReflect() protoreflect.Message
func (*PublishRequest) Reset ¶
func (x *PublishRequest) Reset()
func (*PublishRequest) String ¶
func (x *PublishRequest) String() string
type PublishResponse ¶
type PublishResponse struct { // unique UUID of the publish request // e.g. "123e4567-e89b-12d3-a456-426655440000" RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // unique UUID of the published message // e.g. "123e4567-e89b-12d3-a456-426655440000" MessageId string `protobuf:"bytes,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // correlation id, in case it was generated (when not specified by the request) CorrelationId string `protobuf:"bytes,3,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"` // contains filtered or unexported fields }
func (*PublishResponse) Descriptor
deprecated
func (*PublishResponse) Descriptor() ([]byte, []int)
Deprecated: Use PublishResponse.ProtoReflect.Descriptor instead.
func (*PublishResponse) GetCorrelationId ¶
func (x *PublishResponse) GetCorrelationId() string
func (*PublishResponse) GetMessageId ¶
func (x *PublishResponse) GetMessageId() string
func (*PublishResponse) GetRequestId ¶
func (x *PublishResponse) GetRequestId() string
func (*PublishResponse) ProtoMessage ¶
func (*PublishResponse) ProtoMessage()
func (*PublishResponse) ProtoReflect ¶
func (x *PublishResponse) ProtoReflect() protoreflect.Message
func (*PublishResponse) Reset ¶
func (x *PublishResponse) Reset()
func (*PublishResponse) String ¶
func (x *PublishResponse) String() string
type SubscribeRequest ¶
type SubscribeRequest struct { // unique UUID for the request // e.g. "123e4567-e89b-12d3-a456-426655440000" RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // the topic to subscribe to Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` // message delivery option DeliveryOption DeliveryOption `` /* 136-byte string literal not displayed */ // for DeliveryOption.StartAtSequence StartAtSequence uint64 `protobuf:"varint,4,opt,name=start_at_sequence,json=startAtSequence,proto3" json:"start_at_sequence,omitempty"` // for DeliveryOption.StartAtTime StartAtTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=start_at_time,json=startAtTime,proto3" json:"start_at_time,omitempty"` // for DeliveryOption.StartAtDuration StartAtDuration *duration.Duration `protobuf:"bytes,6,opt,name=start_at_duration,json=startAtDuration,proto3" json:"start_at_duration,omitempty"` // for DeliveryOption.StartAfterLastProcessed DurableName string `protobuf:"bytes,7,opt,name=durable_name,json=durableName,proto3" json:"durable_name,omitempty"` // if provided, will become part of a queue group // where messages are delivered to only one of the subscribers Group string `protobuf:"bytes,8,opt,name=group,proto3" json:"group,omitempty"` // contains filtered or unexported fields }
func (*SubscribeRequest) Descriptor
deprecated
func (*SubscribeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.
func (*SubscribeRequest) GetDeliveryOption ¶
func (x *SubscribeRequest) GetDeliveryOption() DeliveryOption
func (*SubscribeRequest) GetDurableName ¶
func (x *SubscribeRequest) GetDurableName() string
func (*SubscribeRequest) GetGroup ¶
func (x *SubscribeRequest) GetGroup() string
func (*SubscribeRequest) GetRequestId ¶
func (x *SubscribeRequest) GetRequestId() string
func (*SubscribeRequest) GetStartAtDuration ¶
func (x *SubscribeRequest) GetStartAtDuration() *duration.Duration
func (*SubscribeRequest) GetStartAtSequence ¶
func (x *SubscribeRequest) GetStartAtSequence() uint64
func (*SubscribeRequest) GetStartAtTime ¶
func (x *SubscribeRequest) GetStartAtTime() *timestamp.Timestamp
func (*SubscribeRequest) GetTopic ¶
func (x *SubscribeRequest) GetTopic() string
func (*SubscribeRequest) ProtoMessage ¶
func (*SubscribeRequest) ProtoMessage()
func (*SubscribeRequest) ProtoReflect ¶
func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
func (*SubscribeRequest) Reset ¶
func (x *SubscribeRequest) Reset()
func (*SubscribeRequest) String ¶
func (x *SubscribeRequest) String() string
type SubscribeResponse ¶
type SubscribeResponse struct { // unique UUID of the subscribe request // e.g. "123e4567-e89b-12d3-a456-426655440000" RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // unique message UUID // e.g. "123e4567-e89b-12d3-a456-426655440000" MessageId string `protobuf:"bytes,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // topic on which the message was delivered Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"` // message version // e.g. "1.0" Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` // source/origin urn // e.g. "urn:system-x.org.com/service-a" Source string `protobuf:"bytes,7,opt,name=source,proto3" json:"source,omitempty"` // the message payload Payload *any.Any `protobuf:"bytes,8,opt,name=payload,proto3" json:"payload,omitempty"` // correlation id, for distributed tracing and tracking CorrelationId string `protobuf:"bytes,9,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"` // metadata for message, used for communicating contextual information MetaData map[string]string `` /* 174-byte string literal not displayed */ // the MIME type of the data // // this will be derived from the provided payload, taking the form // // 'application/x-protobuf; messageType="x.y.Z"' // // where the messageType is the protobuf message type (corresponds with Any#type_url) // // see https://tools.ietf.org/html/draft-rfernando-protocol-buffers-00 // https://www.charlesproxy.com/documentation/using-charles/protocol-buffers/ // and https://prometheus.io/docs/instrumenting/exposition_formats/ // ContentType string `protobuf:"bytes,11,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` // UTC time the message was created CreatedAt *timestamp.Timestamp `protobuf:"bytes,12,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // UTC time the message was received ReceivedAt *timestamp.Timestamp `protobuf:"bytes,13,opt,name=received_at,json=receivedAt,proto3" json:"received_at,omitempty"` // sequence number of the delivery Sequence uint64 `protobuf:"varint,14,opt,name=sequence,proto3" json:"sequence,omitempty"` // indicates whether the message is a re-delivery of a previously failed delivery Redelivered bool `protobuf:"varint,15,opt,name=redelivered,proto3" json:"redelivered,omitempty"` // contains filtered or unexported fields }
func (*SubscribeResponse) Descriptor
deprecated
func (*SubscribeResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.
func (*SubscribeResponse) GetContentType ¶
func (x *SubscribeResponse) GetContentType() string
func (*SubscribeResponse) GetCorrelationId ¶
func (x *SubscribeResponse) GetCorrelationId() string
func (*SubscribeResponse) GetCreatedAt ¶
func (x *SubscribeResponse) GetCreatedAt() *timestamp.Timestamp
func (*SubscribeResponse) GetMessageId ¶
func (x *SubscribeResponse) GetMessageId() string
func (*SubscribeResponse) GetMetaData ¶
func (x *SubscribeResponse) GetMetaData() map[string]string
func (*SubscribeResponse) GetPayload ¶
func (x *SubscribeResponse) GetPayload() *any.Any
func (*SubscribeResponse) GetReceivedAt ¶
func (x *SubscribeResponse) GetReceivedAt() *timestamp.Timestamp
func (*SubscribeResponse) GetRedelivered ¶
func (x *SubscribeResponse) GetRedelivered() bool
func (*SubscribeResponse) GetRequestId ¶
func (x *SubscribeResponse) GetRequestId() string
func (*SubscribeResponse) GetSequence ¶
func (x *SubscribeResponse) GetSequence() uint64
func (*SubscribeResponse) GetSource ¶
func (x *SubscribeResponse) GetSource() string
func (*SubscribeResponse) GetTopic ¶
func (x *SubscribeResponse) GetTopic() string
func (*SubscribeResponse) GetVersion ¶
func (x *SubscribeResponse) GetVersion() string
func (*SubscribeResponse) ProtoMessage ¶
func (*SubscribeResponse) ProtoMessage()
func (*SubscribeResponse) ProtoReflect ¶
func (x *SubscribeResponse) ProtoReflect() protoreflect.Message
func (*SubscribeResponse) Reset ¶
func (x *SubscribeResponse) Reset()
func (*SubscribeResponse) String ¶
func (x *SubscribeResponse) String() string
type UnimplementedAPIServer ¶
type UnimplementedAPIServer struct { }
UnimplementedAPIServer must be embedded to have forward compatible implementations.
func (UnimplementedAPIServer) Publish ¶
func (UnimplementedAPIServer) Publish(API_PublishServer) error
func (UnimplementedAPIServer) Subscribe ¶
func (UnimplementedAPIServer) Subscribe(*SubscribeRequest, API_SubscribeServer) error
type UnsafeAPIServer ¶
type UnsafeAPIServer interface {
// contains filtered or unexported methods
}
UnsafeAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to APIServer will result in compilation errors.