golang

package
v0.40.6 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComService_PublishEvent_FullMethodName        = "/dda.com.v1.ComService/PublishEvent"
	ComService_SubscribeEvent_FullMethodName      = "/dda.com.v1.ComService/SubscribeEvent"
	ComService_PublishAction_FullMethodName       = "/dda.com.v1.ComService/PublishAction"
	ComService_SubscribeAction_FullMethodName     = "/dda.com.v1.ComService/SubscribeAction"
	ComService_PublishActionResult_FullMethodName = "/dda.com.v1.ComService/PublishActionResult"
	ComService_PublishQuery_FullMethodName        = "/dda.com.v1.ComService/PublishQuery"
	ComService_SubscribeQuery_FullMethodName      = "/dda.com.v1.ComService/SubscribeQuery"
	ComService_PublishQueryResult_FullMethodName  = "/dda.com.v1.ComService/PublishQueryResult"
)

Variables

View Source
var ComService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dda.com.v1.ComService",
	HandlerType: (*ComServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PublishEvent",
			Handler:    _ComService_PublishEvent_Handler,
		},
		{
			MethodName: "PublishActionResult",
			Handler:    _ComService_PublishActionResult_Handler,
		},
		{
			MethodName: "PublishQueryResult",
			Handler:    _ComService_PublishQueryResult_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SubscribeEvent",
			Handler:       _ComService_SubscribeEvent_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "PublishAction",
			Handler:       _ComService_PublishAction_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "SubscribeAction",
			Handler:       _ComService_SubscribeAction_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "PublishQuery",
			Handler:       _ComService_PublishQuery_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "SubscribeQuery",
			Handler:       _ComService_SubscribeQuery_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "com.proto",
}

ComService_ServiceDesc is the grpc.ServiceDesc for ComService 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_state_proto protoreflect.FileDescriptor
View Source
var File_store_proto protoreflect.FileDescriptor

Functions

func RegisterComServiceServer

func RegisterComServiceServer(s grpc.ServiceRegistrar, srv ComServiceServer)

Types

type Ack

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

Empty acknowledgement message.

func (*Ack) Descriptor deprecated

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

Deprecated: Use Ack.ProtoReflect.Descriptor instead.

func (*Ack) ProtoMessage

func (*Ack) ProtoMessage()

func (*Ack) ProtoReflect

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

func (*Ack) Reset

func (x *Ack) Reset()

func (*Ack) String

func (x *Ack) String() string

type Action

type Action struct {

	// Type of action, command or operation to be performed (required).
	//
	// Type is used as a subscription filter for routing the action to consumers
	// via pub-sub messaging. Must be a non-empty string consisting of
	// lower-case ASCII letters ('a' to 'z'), upper-case ASCII letters ('A' to
	// 'Z'), ASCII digits ('0' to '9'), ASCII dot ('.'), ASCII hyphen (-), or
	// ASCII underscore (_).
	//
	// Follow a consistent naming convention for types throughout an application
	// to avoid naming collisions. For example, Type could use Reverse Domain
	// Name Notation (com.mycompany.myapp.mytype) or some other hierarchical
	// naming pattern with some levels in the hierarchy separated by dots,
	// hyphens, or underscores.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Identifies the action (required).
	//
	// Id must be non-empty and unique within the scope of the action invoker.
	// Invokers must ensure that (Source, Id) is unique for each distinct
	// action. Consumers may assume that actions with identical Source and Id
	// are duplicates.
	//
	// Typically, Id is a UUID or a counter maintained by the invoker.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// Identifies the context in which the action is invoked (required).
	//
	// An action source is defined by the action invoker. Invokers must ensure
	// that (Source, Id) is unique for each distinct action. Source must be
	// non-empty.
	//
	// Typically, Source may be a URI describing the organization publishing the
	// action or the process that invokes the action.
	Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"`
	// Parameter data of the action (optional).
	//
	// Encoding and decoding of the transmitted binary data is left to the user of
	// the API interface. Any binary serialization format can be used.
	Params []byte `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"`
	// Content type of params value (optional).
	//
	// If present, it must adhere to the format specified in [RFC 2046]. An empty
	// string value indicates that a content type is implied by the application.
	//
	// [RFC 2046]: https://www.rfc-editor.org/rfc/rfc2046
	DataContentType string `protobuf:"bytes,5,opt,name=data_content_type,json=dataContentType,proto3" json:"data_content_type,omitempty"`
	// contains filtered or unexported fields
}

Action is a structure expressing an action, command, or operation to be carried out by interested action consumers. An Action is routed from an action invoker to interested action consumers using pub-sub messaging.

func (*Action) Descriptor deprecated

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

Deprecated: Use Action.ProtoReflect.Descriptor instead.

func (*Action) GetDataContentType

func (x *Action) GetDataContentType() string

func (*Action) GetId

func (x *Action) GetId() string

func (*Action) GetParams

func (x *Action) GetParams() []byte

func (*Action) GetSource

func (x *Action) GetSource() string

func (*Action) GetType

func (x *Action) GetType() string

func (*Action) ProtoMessage

func (*Action) ProtoMessage()

func (*Action) ProtoReflect

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

func (*Action) Reset

func (x *Action) Reset()

func (*Action) String

func (x *Action) String() string

type ActionCorrelated

type ActionCorrelated struct {

	// Original action.
	Action *Action `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"`
	// An opaque ID generated by this service to correlate an ActionResult with an
	// Action.
	//
	// Each received Action is augmented with a unique correlation ID by this
	// service before being transmitted to a subscriber. A subscriber must include
	// this field in all associated ActionResultCorrelated messages.
	CorrelationId string `protobuf:"bytes,2,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"`
	// contains filtered or unexported fields
}

An Action with a correlation id used to correlate action results.

func (*ActionCorrelated) Descriptor deprecated

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

Deprecated: Use ActionCorrelated.ProtoReflect.Descriptor instead.

func (*ActionCorrelated) GetAction

func (x *ActionCorrelated) GetAction() *Action

func (*ActionCorrelated) GetCorrelationId

func (x *ActionCorrelated) GetCorrelationId() string

func (*ActionCorrelated) ProtoMessage

func (*ActionCorrelated) ProtoMessage()

func (*ActionCorrelated) ProtoReflect

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

func (*ActionCorrelated) Reset

func (x *ActionCorrelated) Reset()

func (*ActionCorrelated) String

func (x *ActionCorrelated) String() string

type ActionResult

type ActionResult struct {

	// Identifies the context, in which the action is executed (required).
	//
	// Typically, Context may be a URI describing the organization consuming the
	// action or the process that carries out the action.
	Context string `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
	// Resulting data to be returned to the action invoker (required).
	//
	// Note that errors occurring while processing an action must also be encoded
	// as result data in an application-specific way.
	//
	// Encoding and decoding of the transmitted binary data is left to the user of
	// the API interface. Any binary serialization format can be used.
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// Content type of data value (optional).
	//
	// If present, it must adhere to the format specified in [RFC 2046]. An empty
	// string value indicates that a content type is implied by the application.
	//
	// [RFC 2046]: https://www.rfc-editor.org/rfc/rfc2046
	DataContentType string `protobuf:"bytes,3,opt,name=data_content_type,json=dataContentType,proto3" json:"data_content_type,omitempty"`
	// The sequence number of a multi-result response (required for progressive
	// responses only).
	//
	// A zero value or -1 indicates a single result. If multiple ActionResults
	// are to be returned, the sequence number is 1 for the first result and
	// incremented by one with each newly generated result. If sequence number
	// overflows its maximum value 9223372036854775807, the next value should
	// revert to 1. A final result should be indicated by using the additive
	// inverse of the generated sequence number.
	//
	// A zero or negative sequence number indicates that no more results will be
	// published for the correlated action after the given one.
	SequenceNumber int64 `protobuf:"varint,4,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"`
	// contains filtered or unexported fields
}

ActionResult is a structure containing resulting information returned to the invoker of an Action. Each interested action consumer may transmit its own action result(s) independently of the others. Multiple ActionResults over time may be generated by a consumer for a single Action to transmit progressive series of results.

func (*ActionResult) Descriptor deprecated

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

Deprecated: Use ActionResult.ProtoReflect.Descriptor instead.

func (*ActionResult) GetContext

func (x *ActionResult) GetContext() string

func (*ActionResult) GetData

func (x *ActionResult) GetData() []byte

func (*ActionResult) GetDataContentType

func (x *ActionResult) GetDataContentType() string

func (*ActionResult) GetSequenceNumber

func (x *ActionResult) GetSequenceNumber() int64

func (*ActionResult) ProtoMessage

func (*ActionResult) ProtoMessage()

func (*ActionResult) ProtoReflect

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

func (*ActionResult) Reset

func (x *ActionResult) Reset()

func (*ActionResult) String

func (x *ActionResult) String() string

type ActionResultCorrelated

type ActionResultCorrelated struct {

	// Original action result.
	Result *ActionResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// An opaque ID generated by this service to correlate an ActionResult with an
	// Action (required).
	//
	// Each received Action is augmented with a unique correlation ID by this
	// service before being transmitted to a subscriber. A subscriber must include
	// this field in all associated ActionResultCorrelated messages.
	CorrelationId string `protobuf:"bytes,2,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"`
	// contains filtered or unexported fields
}

An ActionResult with a correlation id used to correlate the corresponding action.

func (*ActionResultCorrelated) Descriptor deprecated

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

Deprecated: Use ActionResultCorrelated.ProtoReflect.Descriptor instead.

func (*ActionResultCorrelated) GetCorrelationId

func (x *ActionResultCorrelated) GetCorrelationId() string

func (*ActionResultCorrelated) GetResult

func (x *ActionResultCorrelated) GetResult() *ActionResult

func (*ActionResultCorrelated) ProtoMessage

func (*ActionResultCorrelated) ProtoMessage()

func (*ActionResultCorrelated) ProtoReflect

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

func (*ActionResultCorrelated) Reset

func (x *ActionResultCorrelated) Reset()

func (*ActionResultCorrelated) String

func (x *ActionResultCorrelated) String() string

type ComServiceClient

type ComServiceClient interface {
	// Publish the given Event and receive an acknowledgement after event has been
	// transmitted by the DDA communication service. PublishEvent does not wait
	// for the event to be received by subscribing gRPC clients.
	//
	// If the given event cannot be transmitted, a gRPC error with status code
	// UNAVAILABLE (14) is signaled.
	PublishEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*Ack, error)
	// Subscribe for receiving Event messages that match the given
	// SubscriptionFilter.
	//
	// If the given subscription cannot be set up, a gRPC error with status code
	// UNAVAILABLE (14) is signaled. If an event cannot be transmitted to the gRPC
	// client, the stream is aborted with status code UNAVAILABLE (14).
	//
	// To stop receiving events, a gRPC client should cancel this server streaming
	// call or specify a deadline/timeout with this call from the very start.
	SubscribeEvent(ctx context.Context, in *SubscriptionFilter, opts ...grpc.CallOption) (ComService_SubscribeEventClient, error)
	// Publish the given Action and receive ActionResult messages.
	//
	// If the given action cannot be transmitted, a gRPC error with status code
	// UNAVAILABLE (14) is signaled. If an action result cannot be transmitted to
	// the gRPC client, the stream is aborted.
	PublishAction(ctx context.Context, in *Action, opts ...grpc.CallOption) (ComService_PublishActionClient, error)
	// Subscribe for receiving Action messages sent by rpc PublishAction that
	// match the given SubscriptionFilter. Received Actions are augmented by an
	// opaque correlation id that must be passed to correlated action results.
	//
	// If the given subscription cannot be set up, a gRPC error with status code
	// UNAVAILABLE (14) is signaled. If an action cannot be transmitted to the
	// gRPC client, the stream is aborted.
	//
	// To stop receiving actions, a gRPC client should cancel this server
	// streaming call or specify a deadline/timeout with this call from the very
	// start.
	SubscribeAction(ctx context.Context, in *SubscriptionFilter, opts ...grpc.CallOption) (ComService_SubscribeActionClient, error)
	// Publish the given action result correlated to an Action received by rpc
	// SubscribeAction and receive an acknowledgement after the result has been
	// transmitted by the DDA communication service.
	//
	// If the given correlation id is invalid, or if a final action result has
	// already been sent, a gRPC error with status code INVALID_ARGUMENT (3) is
	// signaled. If the action result cannot be transmitted by the DDA
	// communication service, a gRPC error with status code UNAVAILABLE (14) is
	// signaled.
	PublishActionResult(ctx context.Context, in *ActionResultCorrelated, opts ...grpc.CallOption) (*Ack, error)
	// Publish the given Query and receive QueryResult messages.
	//
	// If the given query cannot be transmitted, a gRPC error with status code
	// UNAVAILABLE (14) is signaled. If a query result cannot be transmitted to
	// the gRPC client, the stream is aborted.
	PublishQuery(ctx context.Context, in *Query, opts ...grpc.CallOption) (ComService_PublishQueryClient, error)
	// Subscribe for receiving Query messages sent by rpc PublishQuery that match
	// the given SubscriptionFilter. Received Queries are augmented by an opaque
	// correlation id that must be passed to correlated query results.
	//
	// If the given subscription cannot be set up, a gRPC error with status code
	// UNAVAILABLE (14) is signaled. If a query cannot be transmitted to the gRPC
	// client, the stream is aborted.
	//
	// To stop receiving queries, a gRPC client should cancel this server
	// streaming call or specify a deadline/timeout with this call from the very
	// start.
	SubscribeQuery(ctx context.Context, in *SubscriptionFilter, opts ...grpc.CallOption) (ComService_SubscribeQueryClient, error)
	// Publish the given query result correlated to a Query received by rpc
	// SubscribeQuery and receive an acknowledgement after the result has been
	// transmitted by the DDA communication service.
	//
	// If the given correlation id is invalid, or if a final query result has
	// already been sent, a gRPC error with status code INVALID_ARGUMENT (3) is
	// signaled. If the query result cannot be transmitted by the DDA
	// communication service, a gRPC error with status code UNAVAILABLE (14) is
	// signaled.
	PublishQueryResult(ctx context.Context, in *QueryResultCorrelated, opts ...grpc.CallOption) (*Ack, error)
}

ComServiceClient is the client API for ComService 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 NewComServiceClient

func NewComServiceClient(cc grpc.ClientConnInterface) ComServiceClient

type ComServiceServer

type ComServiceServer interface {
	// Publish the given Event and receive an acknowledgement after event has been
	// transmitted by the DDA communication service. PublishEvent does not wait
	// for the event to be received by subscribing gRPC clients.
	//
	// If the given event cannot be transmitted, a gRPC error with status code
	// UNAVAILABLE (14) is signaled.
	PublishEvent(context.Context, *Event) (*Ack, error)
	// Subscribe for receiving Event messages that match the given
	// SubscriptionFilter.
	//
	// If the given subscription cannot be set up, a gRPC error with status code
	// UNAVAILABLE (14) is signaled. If an event cannot be transmitted to the gRPC
	// client, the stream is aborted with status code UNAVAILABLE (14).
	//
	// To stop receiving events, a gRPC client should cancel this server streaming
	// call or specify a deadline/timeout with this call from the very start.
	SubscribeEvent(*SubscriptionFilter, ComService_SubscribeEventServer) error
	// Publish the given Action and receive ActionResult messages.
	//
	// If the given action cannot be transmitted, a gRPC error with status code
	// UNAVAILABLE (14) is signaled. If an action result cannot be transmitted to
	// the gRPC client, the stream is aborted.
	PublishAction(*Action, ComService_PublishActionServer) error
	// Subscribe for receiving Action messages sent by rpc PublishAction that
	// match the given SubscriptionFilter. Received Actions are augmented by an
	// opaque correlation id that must be passed to correlated action results.
	//
	// If the given subscription cannot be set up, a gRPC error with status code
	// UNAVAILABLE (14) is signaled. If an action cannot be transmitted to the
	// gRPC client, the stream is aborted.
	//
	// To stop receiving actions, a gRPC client should cancel this server
	// streaming call or specify a deadline/timeout with this call from the very
	// start.
	SubscribeAction(*SubscriptionFilter, ComService_SubscribeActionServer) error
	// Publish the given action result correlated to an Action received by rpc
	// SubscribeAction and receive an acknowledgement after the result has been
	// transmitted by the DDA communication service.
	//
	// If the given correlation id is invalid, or if a final action result has
	// already been sent, a gRPC error with status code INVALID_ARGUMENT (3) is
	// signaled. If the action result cannot be transmitted by the DDA
	// communication service, a gRPC error with status code UNAVAILABLE (14) is
	// signaled.
	PublishActionResult(context.Context, *ActionResultCorrelated) (*Ack, error)
	// Publish the given Query and receive QueryResult messages.
	//
	// If the given query cannot be transmitted, a gRPC error with status code
	// UNAVAILABLE (14) is signaled. If a query result cannot be transmitted to
	// the gRPC client, the stream is aborted.
	PublishQuery(*Query, ComService_PublishQueryServer) error
	// Subscribe for receiving Query messages sent by rpc PublishQuery that match
	// the given SubscriptionFilter. Received Queries are augmented by an opaque
	// correlation id that must be passed to correlated query results.
	//
	// If the given subscription cannot be set up, a gRPC error with status code
	// UNAVAILABLE (14) is signaled. If a query cannot be transmitted to the gRPC
	// client, the stream is aborted.
	//
	// To stop receiving queries, a gRPC client should cancel this server
	// streaming call or specify a deadline/timeout with this call from the very
	// start.
	SubscribeQuery(*SubscriptionFilter, ComService_SubscribeQueryServer) error
	// Publish the given query result correlated to a Query received by rpc
	// SubscribeQuery and receive an acknowledgement after the result has been
	// transmitted by the DDA communication service.
	//
	// If the given correlation id is invalid, or if a final query result has
	// already been sent, a gRPC error with status code INVALID_ARGUMENT (3) is
	// signaled. If the query result cannot be transmitted by the DDA
	// communication service, a gRPC error with status code UNAVAILABLE (14) is
	// signaled.
	PublishQueryResult(context.Context, *QueryResultCorrelated) (*Ack, error)
	// contains filtered or unexported methods
}

ComServiceServer is the server API for ComService service. All implementations must embed UnimplementedComServiceServer for forward compatibility

type ComService_PublishActionClient

type ComService_PublishActionClient interface {
	Recv() (*ActionResult, error)
	grpc.ClientStream
}

type ComService_PublishActionServer

type ComService_PublishActionServer interface {
	Send(*ActionResult) error
	grpc.ServerStream
}

type ComService_PublishQueryClient

type ComService_PublishQueryClient interface {
	Recv() (*QueryResult, error)
	grpc.ClientStream
}

type ComService_PublishQueryServer

type ComService_PublishQueryServer interface {
	Send(*QueryResult) error
	grpc.ServerStream
}

type ComService_SubscribeActionClient

type ComService_SubscribeActionClient interface {
	Recv() (*ActionCorrelated, error)
	grpc.ClientStream
}

type ComService_SubscribeActionServer

type ComService_SubscribeActionServer interface {
	Send(*ActionCorrelated) error
	grpc.ServerStream
}

type ComService_SubscribeEventClient

type ComService_SubscribeEventClient interface {
	Recv() (*Event, error)
	grpc.ClientStream
}

type ComService_SubscribeEventServer

type ComService_SubscribeEventServer interface {
	Send(*Event) error
	grpc.ServerStream
}

type ComService_SubscribeQueryClient

type ComService_SubscribeQueryClient interface {
	Recv() (*QueryCorrelated, error)
	grpc.ClientStream
}

type ComService_SubscribeQueryServer

type ComService_SubscribeQueryServer interface {
	Send(*QueryCorrelated) error
	grpc.ServerStream
}

type Event

type Event struct {

	// Type of event related to the originating occurrence (required).
	//
	// Type is used as a subscription filter for routing the event to consumers
	// via pub-sub messaging. Must be a non-empty string consisting of
	// lower-case ASCII letters ('a' to 'z'), upper-case ASCII letters ('A' to
	// 'Z'), ASCII digits ('0' to '9'), ASCII dot ('.'), ASCII hyphen (-), or
	// ASCII underscore (_).
	//
	// Follow a consistent naming convention for types throughout an application
	// to avoid naming collisions. For example, Type could use Reverse Domain
	// Name Notation (com.mycompany.myapp.mytype) or some other hierarchical
	// naming pattern with some levels in the hierarchy separated by dots,
	// hyphens, or underscores.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Identifies the event (required).
	//
	// Id must be non-empty and unique within the scope of the producer.
	// Producers must ensure that (Source, Id) is unique for each distinct
	// event. Consumers may assume that events with identical Source and Id are
	// duplicates.
	//
	// Typically, Id is a UUID or a counter maintained by the producer.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// Identifies the context in which the event occurred (required).
	//
	// An event source is defined by the event producer. Producers must ensure
	// that (Source, Id) is unique for each distinct event. Source must be
	// non-empty.
	//
	// Typically, Source may be a URI describing the organization publishing the
	// event or the process that generates the event.
	Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"`
	// Timestamp when the occurrence happened or when the event data has been
	// generated (optional).
	//
	// If present, must adhere to the format specified in [RFC 3339]. An empty
	// string value indicates that a timestamp is not available or needed.
	//
	// [RFC 3339]: https://www.rfc-editor.org/rfc/rfc3339
	Time string `protobuf:"bytes,4,opt,name=time,proto3" json:"time,omitempty"`
	// Domain-specific payload information about the occurrence (required).
	//
	// Encoding and decoding of the transmitted binary data is left to the user of
	// the API interface. Any binary serialization format can be used.
	Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	// Content type of data value (optional).
	//
	// If present, it must adhere to the format specified in [RFC 2046]. An empty
	// string value indicates that a content type is implied by the application.
	//
	// [RFC 2046]: https://www.rfc-editor.org/rfc/rfc2046
	DataContentType string `protobuf:"bytes,6,opt,name=data_content_type,json=dataContentType,proto3" json:"data_content_type,omitempty"`
	// contains filtered or unexported fields
}

Event is a message expressing an occurrence and its context. An event may occur due to a raised or observed signal, a state change, an elapsed timer, an observed or taken measurement, or any other announcement or activity. An Event is routed from an event producer (source) to interested event consumers using pub-sub messaging.

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetData

func (x *Event) GetData() []byte

func (*Event) GetDataContentType

func (x *Event) GetDataContentType() string

func (*Event) GetId

func (x *Event) GetId() string

func (*Event) GetSource

func (x *Event) GetSource() string

func (*Event) GetTime

func (x *Event) GetTime() string

func (*Event) GetType

func (x *Event) GetType() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type Query

type Query struct {

	// Type of query indicating intent or desired result (required).
	//
	// Type is used as a subscription filter for routing the query to consumers
	// via pub-sub messaging. Must be a non-empty string consisting of
	// lower-case ASCII letters ('a' to 'z'), upper-case ASCII letters ('A' to
	// 'Z'), ASCII digits ('0' to '9'), ASCII dot ('.'), ASCII hyphen (-), or
	// ASCII underscore (_).
	//
	// Follow a consistent naming convention for types throughout an application
	// to avoid naming collisions. For example, Type could use Reverse Domain
	// Name Notation (com.mycompany.myapp.mytype) or some other hierarchical
	// naming pattern with some levels in the hierarchy separated by dots,
	// hyphens, or underscores.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Identifies the query (required).
	//
	// Id must be non-empty and unique within the scope of the querier. Queriers
	// must ensure that (Source, Id) is unique for each distinct query.
	// Consumers may assume that queries with identical Source and Id are
	// duplicates.
	//
	// Typically, Id is a UUID or a counter maintained by the querier.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// Identifies the context in which the query is posed (required).
	//
	// A query source is defined by the querier. Queriers must ensure that
	// (Source, Id) is unique for each distinct query. Source must be non-empty.
	//
	// Typically, Source may be a URI describing the organization publishing the
	// query or the process that poses the query.
	Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"`
	// Query data represented as indicated by query format (required).
	//
	// Encoding and decoding of the transmitted binary data is left to the user of
	// the API interface. Any binary serialization format can be used.
	Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	// Content type of data value (optional).
	//
	// If present, it must adhere to the format specified in [RFC 2046]. An empty
	// string value indicates that a content type is implied by the application.
	//
	// The context type should represent the query language/format. For example, a
	// GraphQL query should use "application/graphql" and a SPARQL query should
	// use "application/sparql-query".
	//
	// [RFC 2046]: https://www.rfc-editor.org/rfc/rfc2046
	DataContentType string `protobuf:"bytes,5,opt,name=data_content_type,json=dataContentType,proto3" json:"data_content_type,omitempty"`
	// contains filtered or unexported fields
}

Query is a structure expressing a query to be answered by interested query consumers. A Query is routed from a querier to interested query consumers using pub-sub messaging.

func (*Query) Descriptor deprecated

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

Deprecated: Use Query.ProtoReflect.Descriptor instead.

func (*Query) GetData

func (x *Query) GetData() []byte

func (*Query) GetDataContentType

func (x *Query) GetDataContentType() string

func (*Query) GetId

func (x *Query) GetId() string

func (*Query) GetSource

func (x *Query) GetSource() string

func (*Query) GetType

func (x *Query) GetType() string

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) ProtoReflect

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

func (*Query) Reset

func (x *Query) Reset()

func (*Query) String

func (x *Query) String() string

type QueryCorrelated

type QueryCorrelated struct {

	// Original query.
	Query *Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// An opaque ID generated by this service to correlate a QueryResult with a
	// Query.
	//
	// Each received Query is augmented with a unique correlation ID by this
	// service before being transmitted to a subscriber. A subscriber must include
	// this field in all associated QueryResultCorrelated messages.
	CorrelationId string `protobuf:"bytes,2,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"`
	// contains filtered or unexported fields
}

A Query with a correlation id used to correlate query results.

func (*QueryCorrelated) Descriptor deprecated

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

Deprecated: Use QueryCorrelated.ProtoReflect.Descriptor instead.

func (*QueryCorrelated) GetCorrelationId

func (x *QueryCorrelated) GetCorrelationId() string

func (*QueryCorrelated) GetQuery

func (x *QueryCorrelated) GetQuery() *Query

func (*QueryCorrelated) ProtoMessage

func (*QueryCorrelated) ProtoMessage()

func (*QueryCorrelated) ProtoReflect

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

func (*QueryCorrelated) Reset

func (x *QueryCorrelated) Reset()

func (*QueryCorrelated) String

func (x *QueryCorrelated) String() string

type QueryResult

type QueryResult struct {

	// Identifies the context, in which the query is executed (required).
	//
	// Typically, Context may be a URI describing the organization consuming the
	// query or the process that retrieves query result data.
	Context string `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
	// Query result data represented as indicated by query format (required).
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// Content type of data value (optional).
	//
	// If present, it must adhere to the format specified in [RFC 2046]. An empty
	// string value indicates that a content type is implied by the application.
	//
	// If present, use MIME Content Types to specify the query result format. For
	// example, use "application/sql" for a SQL query result,
	// "application/graphql" for a GraphQL query result,
	// "application/sparql-results+json" for a SPARQL query result encoded in
	// JSON.
	//
	// [RFC 2046]: https://www.rfc-editor.org/rfc/rfc2046
	DataContentType string `protobuf:"bytes,3,opt,name=data_content_type,json=dataContentType,proto3" json:"data_content_type,omitempty"`
	// The sequence number of a multi-result live query (required for live query
	// responses only).
	//
	// A zero value or -1 indicates a single result. If multiple QueryResults
	// are to be returned, the sequence number is 1 for the first result and
	// incremented by one with each newly generated result. If sequence number
	// overflows its maximum value 9223372036854775807, the next value should
	// revert to 1. A final result should be indicated by using the additive
	// inverse of the generated sequence number.
	//
	// A zero or negative sequence number indicates that no more results will be
	// published for the correlated action after the given one.
	SequenceNumber int64 `protobuf:"varint,4,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"`
	// contains filtered or unexported fields
}

QueryResult is a structure containing resulting information returned to the querier. Each interested query consumer may transmit its own query result(s) independently of the others. Multiple QueryResults over time may be generated by a consumer for a single Query to transmit live query results whenever the query yields new results due to update operations on the database.

func (*QueryResult) Descriptor deprecated

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

Deprecated: Use QueryResult.ProtoReflect.Descriptor instead.

func (*QueryResult) GetContext

func (x *QueryResult) GetContext() string

func (*QueryResult) GetData

func (x *QueryResult) GetData() []byte

func (*QueryResult) GetDataContentType

func (x *QueryResult) GetDataContentType() string

func (*QueryResult) GetSequenceNumber

func (x *QueryResult) GetSequenceNumber() int64

func (*QueryResult) ProtoMessage

func (*QueryResult) ProtoMessage()

func (*QueryResult) ProtoReflect

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

func (*QueryResult) Reset

func (x *QueryResult) Reset()

func (*QueryResult) String

func (x *QueryResult) String() string

type QueryResultCorrelated

type QueryResultCorrelated struct {

	// Original query result.
	Result *QueryResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// An opaque ID generated by this service to correlate a QueryResult with a
	// Query (required).
	//
	// Each received Query is augmented with a unique correlation ID by this
	// service before being transmitted to a subscriber. A subscriber must include
	// this field in all associated QueryResultCorrelated messages.
	CorrelationId string `protobuf:"bytes,2,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"`
	// contains filtered or unexported fields
}

A QueryResult with a correlation id used to correlate the corresponding query.

func (*QueryResultCorrelated) Descriptor deprecated

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

Deprecated: Use QueryResultCorrelated.ProtoReflect.Descriptor instead.

func (*QueryResultCorrelated) GetCorrelationId

func (x *QueryResultCorrelated) GetCorrelationId() string

func (*QueryResultCorrelated) GetResult

func (x *QueryResultCorrelated) GetResult() *QueryResult

func (*QueryResultCorrelated) ProtoMessage

func (*QueryResultCorrelated) ProtoMessage()

func (*QueryResultCorrelated) ProtoReflect

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

func (*QueryResultCorrelated) Reset

func (x *QueryResultCorrelated) Reset()

func (*QueryResultCorrelated) String

func (x *QueryResultCorrelated) String() string

type SubscriptionFilter

type SubscriptionFilter struct {

	// Type of Event, Action, or Query to be filtered (required).
	//
	// Must be a non-empty string consisting of lower-case ASCII letters ('a' to
	// 'z'), upper-case ASCII letters ('A' to 'Z'), ASCII digits ('0' to '9'),
	// ASCII dot ('.'), ASCII hyphen (-), or ASCII underscore (_).
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Name to be used for a shared subscription (optional).
	//
	// A shared subscription is not routed to all subscribers specifying the
	// same Scope, Type, and Share, but only to one of these. Shared
	// subscriptions may be used to load balance published tasks so as to
	// distribute workload evenly among a set of subscribers. Another use case
	// is high availability through redundancy where a secondary subscribers
	// takes over published tasks if the primary subscriber is no longer
	// reachable (hot standby). Typically, shared subscriptions are used with
	// the Action pattern.
	//
	// A published Event, Action, or Query is matching a shared subscription
	// named Share if it provides the same Scope and Type. If multiple shared
	// subscriptions with different Share names but the same Scope and Type
	// match such a publication, it will be routed to one (and only one) in each
	// Share group.
	//
	// If non-empty, must consist of lower-case ASCII letters ('a' to 'z'),
	// upper-case ASCII letters ('A' to 'Z'), ASCII digits ('0' to '9'), ASCII
	// dot ('.'), ASCII hyphen (-), or ASCII underscore (_).
	//
	// If not present or an empty string, the related subscription is not
	// shared.
	Share string `protobuf:"bytes,2,opt,name=share,proto3" json:"share,omitempty"`
	// contains filtered or unexported fields
}

A SubscriptionFilter defines the context that determines which publications should be transmitted to a subscriber.

func (*SubscriptionFilter) Descriptor deprecated

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

Deprecated: Use SubscriptionFilter.ProtoReflect.Descriptor instead.

func (*SubscriptionFilter) GetShare

func (x *SubscriptionFilter) GetShare() string

func (*SubscriptionFilter) GetType

func (x *SubscriptionFilter) GetType() string

func (*SubscriptionFilter) ProtoMessage

func (*SubscriptionFilter) ProtoMessage()

func (*SubscriptionFilter) ProtoReflect

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

func (*SubscriptionFilter) Reset

func (x *SubscriptionFilter) Reset()

func (*SubscriptionFilter) String

func (x *SubscriptionFilter) String() string

type UnimplementedComServiceServer

type UnimplementedComServiceServer struct {
}

UnimplementedComServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedComServiceServer) PublishAction

func (UnimplementedComServiceServer) PublishActionResult

func (UnimplementedComServiceServer) PublishEvent

func (UnimplementedComServiceServer) PublishQuery

func (UnimplementedComServiceServer) PublishQueryResult

func (UnimplementedComServiceServer) SubscribeAction

func (UnimplementedComServiceServer) SubscribeEvent

func (UnimplementedComServiceServer) SubscribeQuery

type UnsafeComServiceServer

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

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

Jump to

Keyboard shortcuts

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