Documentation ¶
Index ¶
- Variables
- func RegisterEnsignServer(s grpc.ServiceRegistrar, srv EnsignServer)
- type Ack
- type CloseStream
- func (*CloseStream) Descriptor() ([]byte, []int)deprecated
- func (x *CloseStream) GetConsumers() uint64
- func (x *CloseStream) GetEvents() uint64
- func (x *CloseStream) GetTopicOffset() uint64
- func (*CloseStream) ProtoMessage()
- func (x *CloseStream) ProtoReflect() protoreflect.Message
- func (x *CloseStream) Reset()
- func (x *CloseStream) String() string
- type Compression
- type Encryption
- type EnsignClient
- type EnsignServer
- type Ensign_PublishClient
- type Ensign_PublishServer
- type Ensign_SubscribeClient
- type Ensign_SubscribeServer
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetCommitted() *timestamppb.Timestamp
- func (x *Event) GetCompression() *Compression
- func (x *Event) GetCreated() *timestamppb.Timestamp
- func (x *Event) GetData() []byte
- func (x *Event) GetEncryption() *Encryption
- func (x *Event) GetGeography() *Region
- func (x *Event) GetId() string
- func (x *Event) GetMimetype() v1beta1.MIME
- func (x *Event) GetPublisher() *Publisher
- func (x *Event) GetTopicId() string
- func (x *Event) GetType() *Type
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type HealthCheck
- func (*HealthCheck) Descriptor() ([]byte, []int)deprecated
- func (x *HealthCheck) GetAttempts() uint32
- func (x *HealthCheck) GetLastCheckedAt() *timestamppb.Timestamp
- func (*HealthCheck) ProtoMessage()
- func (x *HealthCheck) ProtoReflect() protoreflect.Message
- func (x *HealthCheck) Reset()
- func (x *HealthCheck) String() string
- type Nack
- type OpenStream
- type PageInfo
- type Publication
- func (*Publication) Descriptor() ([]byte, []int)deprecated
- func (x *Publication) GetAck() *Ack
- func (x *Publication) GetCloseStream() *CloseStream
- func (m *Publication) GetEmbed() isPublication_Embed
- func (x *Publication) GetNack() *Nack
- func (*Publication) ProtoMessage()
- func (x *Publication) ProtoReflect() protoreflect.Message
- func (x *Publication) Reset()
- func (x *Publication) String() string
- type Publication_Ack
- type Publication_CloseStream
- type Publication_Nack
- type Publisher
- type Region
- type ServiceState
- func (*ServiceState) Descriptor() ([]byte, []int)deprecated
- func (x *ServiceState) GetNotAfter() *timestamppb.Timestamp
- func (x *ServiceState) GetNotBefore() *timestamppb.Timestamp
- func (x *ServiceState) GetStatus() ServiceState_Status
- func (x *ServiceState) GetUptime() *durationpb.Duration
- func (x *ServiceState) GetVersion() string
- func (*ServiceState) ProtoMessage()
- func (x *ServiceState) ProtoReflect() protoreflect.Message
- func (x *ServiceState) Reset()
- func (x *ServiceState) String() string
- type ServiceState_Status
- func (ServiceState_Status) Descriptor() protoreflect.EnumDescriptor
- func (x ServiceState_Status) Enum() *ServiceState_Status
- func (ServiceState_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x ServiceState_Status) Number() protoreflect.EnumNumber
- func (x ServiceState_Status) String() string
- func (ServiceState_Status) Type() protoreflect.EnumType
- type Subscription
- func (*Subscription) Descriptor() ([]byte, []int)deprecated
- func (x *Subscription) GetAck() *Ack
- func (m *Subscription) GetEmbed() isSubscription_Embed
- func (x *Subscription) GetNack() *Nack
- func (x *Subscription) GetOpenStream() *OpenStream
- func (*Subscription) ProtoMessage()
- func (x *Subscription) ProtoReflect() protoreflect.Message
- func (x *Subscription) Reset()
- func (x *Subscription) String() string
- type Subscription_Ack
- type Subscription_Nack
- type Subscription_OpenStream
- type Topic
- func (*Topic) Descriptor() ([]byte, []int)deprecated
- func (x *Topic) GetCreated() *timestamppb.Timestamp
- func (x *Topic) GetId() string
- func (x *Topic) GetName() string
- func (x *Topic) GetReadonly() bool
- func (x *Topic) GetRegions() []*Region
- func (x *Topic) GetTypes() []*Type
- func (*Topic) ProtoMessage()
- func (x *Topic) ProtoReflect() protoreflect.Message
- func (x *Topic) Reset()
- func (x *Topic) String() string
- type TopicMod
- type TopicMod_Operation
- func (TopicMod_Operation) Descriptor() protoreflect.EnumDescriptor
- func (x TopicMod_Operation) Enum() *TopicMod_Operation
- func (TopicMod_Operation) EnumDescriptor() ([]byte, []int)deprecated
- func (x TopicMod_Operation) Number() protoreflect.EnumNumber
- func (x TopicMod_Operation) String() string
- func (TopicMod_Operation) Type() protoreflect.EnumType
- type TopicTombstone
- func (*TopicTombstone) Descriptor() ([]byte, []int)deprecated
- func (x *TopicTombstone) GetId() string
- func (x *TopicTombstone) GetState() TopicTombstone_Status
- func (*TopicTombstone) ProtoMessage()
- func (x *TopicTombstone) ProtoReflect() protoreflect.Message
- func (x *TopicTombstone) Reset()
- func (x *TopicTombstone) String() string
- type TopicTombstone_Status
- func (TopicTombstone_Status) Descriptor() protoreflect.EnumDescriptor
- func (x TopicTombstone_Status) Enum() *TopicTombstone_Status
- func (TopicTombstone_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x TopicTombstone_Status) Number() protoreflect.EnumNumber
- func (x TopicTombstone_Status) String() string
- func (TopicTombstone_Status) Type() protoreflect.EnumType
- type TopicsPage
- func (*TopicsPage) Descriptor() ([]byte, []int)deprecated
- func (x *TopicsPage) GetNextPageToken() string
- func (x *TopicsPage) GetTopics() []*Topic
- func (*TopicsPage) ProtoMessage()
- func (x *TopicsPage) ProtoReflect() protoreflect.Message
- func (x *TopicsPage) Reset()
- func (x *TopicsPage) String() string
- type Type
- type UnimplementedEnsignServer
- func (UnimplementedEnsignServer) CreateTopic(context.Context, *Topic) (*Topic, error)
- func (UnimplementedEnsignServer) DeleteTopic(context.Context, *TopicMod) (*TopicTombstone, error)
- func (UnimplementedEnsignServer) ListTopics(context.Context, *PageInfo) (*TopicsPage, error)
- func (UnimplementedEnsignServer) Publish(Ensign_PublishServer) error
- func (UnimplementedEnsignServer) Status(context.Context, *HealthCheck) (*ServiceState, error)
- func (UnimplementedEnsignServer) Subscribe(Ensign_SubscribeServer) error
- type UnsafeEnsignServer
Constants ¶
This section is empty.
Variables ¶
var ( ServiceState_Status_name = map[int32]string{ 0: "UNKNOWN", 1: "HEALTHY", 2: "UNHEALTHY", 3: "DANGER", 4: "OFFLINE", 5: "MAINTENANCE", } ServiceState_Status_value = map[string]int32{ "UNKNOWN": 0, "HEALTHY": 1, "UNHEALTHY": 2, "DANGER": 3, "OFFLINE": 4, "MAINTENANCE": 5, } )
Enum value maps for ServiceState_Status.
var ( TopicMod_Operation_name = map[int32]string{ 0: "NOOP", 1: "ARCHIVE", 2: "DESTROY", } TopicMod_Operation_value = map[string]int32{ "NOOP": 0, "ARCHIVE": 1, "DESTROY": 2, } )
Enum value maps for TopicMod_Operation.
var ( TopicTombstone_Status_name = map[int32]string{ 0: "UNKNOWN", 1: "READONLY", 2: "DELETING", } TopicTombstone_Status_value = map[string]int32{ "UNKNOWN": 0, "READONLY": 1, "DELETING": 2, } )
Enum value maps for TopicTombstone_Status.
var Ensign_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ensign.v1beta1.Ensign", HandlerType: (*EnsignServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListTopics", Handler: _Ensign_ListTopics_Handler, }, { MethodName: "CreateTopic", Handler: _Ensign_CreateTopic_Handler, }, { MethodName: "DeleteTopic", Handler: _Ensign_DeleteTopic_Handler, }, { MethodName: "Status", Handler: _Ensign_Status_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Publish", Handler: _Ensign_Publish_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "Subscribe", Handler: _Ensign_Subscribe_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "ensign/v1beta1/ensign.proto", }
Ensign_ServiceDesc is the grpc.ServiceDesc for Ensign service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_ensign_v1beta1_ensign_proto protoreflect.FileDescriptor
var File_ensign_v1beta1_event_proto protoreflect.FileDescriptor
var File_ensign_v1beta1_topic_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEnsignServer ¶
func RegisterEnsignServer(s grpc.ServiceRegistrar, srv EnsignServer)
Types ¶
type Ack ¶
type Ack struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Committed *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=committed,proto3" json:"committed,omitempty"` // contains filtered or unexported fields }
Ack represents the receipt and final handling of an event. This datatype should be small so that throughput is not affected and generally only contains the ID of the event being acknowledged. When Ensign commits an event to the log from the producer, the commit timestamp is returned to help determine event latency. When clients ack an event back to the Ensign server, they only need contain the id.
func (*Ack) Descriptor
deprecated
func (*Ack) GetCommitted ¶
func (x *Ack) GetCommitted() *timestamppb.Timestamp
func (*Ack) ProtoMessage ¶
func (*Ack) ProtoMessage()
func (*Ack) ProtoReflect ¶
func (x *Ack) ProtoReflect() protoreflect.Message
type CloseStream ¶
type CloseStream struct { Events uint64 `protobuf:"varint,1,opt,name=events,proto3" json:"events,omitempty"` TopicOffset uint64 `protobuf:"varint,2,opt,name=topic_offset,json=topicOffset,proto3" json:"topic_offset,omitempty"` Consumers uint64 `protobuf:"varint,3,opt,name=consumers,proto3" json:"consumers,omitempty"` // contains filtered or unexported fields }
CloseStream returns some basic stats and topic information to the publisher when the stream is closed and provides feedback that the stream was closed successfully.
func (*CloseStream) Descriptor
deprecated
func (*CloseStream) Descriptor() ([]byte, []int)
Deprecated: Use CloseStream.ProtoReflect.Descriptor instead.
func (*CloseStream) GetConsumers ¶
func (x *CloseStream) GetConsumers() uint64
func (*CloseStream) GetEvents ¶
func (x *CloseStream) GetEvents() uint64
func (*CloseStream) GetTopicOffset ¶
func (x *CloseStream) GetTopicOffset() uint64
func (*CloseStream) ProtoMessage ¶
func (*CloseStream) ProtoMessage()
func (*CloseStream) ProtoReflect ¶
func (x *CloseStream) ProtoReflect() protoreflect.Message
func (*CloseStream) Reset ¶
func (x *CloseStream) Reset()
func (*CloseStream) String ¶
func (x *CloseStream) String() string
type Compression ¶
type Compression struct { Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` // contains filtered or unexported fields }
Metadata about compression used to reduce the storage size of the event. TODO: should we compress each event individually or blocks of events together? TODO: this is only partially implemented
func (*Compression) Descriptor
deprecated
func (*Compression) Descriptor() ([]byte, []int)
Deprecated: Use Compression.ProtoReflect.Descriptor instead.
func (*Compression) GetAlgorithm ¶
func (x *Compression) GetAlgorithm() string
func (*Compression) ProtoMessage ¶
func (*Compression) ProtoMessage()
func (*Compression) ProtoReflect ¶
func (x *Compression) ProtoReflect() protoreflect.Message
func (*Compression) Reset ¶
func (x *Compression) Reset()
func (*Compression) String ¶
func (x *Compression) String() string
type Encryption ¶
type Encryption struct { Algorithm string `protobuf:"bytes,1,opt,name=algorithm,proto3" json:"algorithm,omitempty"` KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` // contains filtered or unexported fields }
Metadata about the cryptography used to secure the event. TODO: should we encrypt each event individually or blocks of events together? TODO: this is only partially implemented
func (*Encryption) Descriptor
deprecated
func (*Encryption) Descriptor() ([]byte, []int)
Deprecated: Use Encryption.ProtoReflect.Descriptor instead.
func (*Encryption) GetAlgorithm ¶
func (x *Encryption) GetAlgorithm() string
func (*Encryption) GetKeyId ¶
func (x *Encryption) GetKeyId() string
func (*Encryption) ProtoMessage ¶
func (*Encryption) ProtoMessage()
func (*Encryption) ProtoReflect ¶
func (x *Encryption) ProtoReflect() protoreflect.Message
func (*Encryption) Reset ¶
func (x *Encryption) Reset()
func (*Encryption) String ¶
func (x *Encryption) String() string
type EnsignClient ¶
type EnsignClient interface { // Both the Publish and Subscribe RPCs are bidirectional streaming to allow for acks // and nacks of events to be sent between Ensign and the client. The Publish stream // is opened and the client sends events and receives acks/nacks -- when the client // closes the publish stream, the server sends back information about the current // state of the topic. When the Subscribe stream is opened, the client must send an // open stream message with the subscription info before receiving events. Once it // receives events it must send back acks/nacks up the stream so that Ensign // advances the topic offset for the rest of the clients in the group. Publish(ctx context.Context, opts ...grpc.CallOption) (Ensign_PublishClient, error) Subscribe(ctx context.Context, opts ...grpc.CallOption) (Ensign_SubscribeClient, error) // This is a simple topic management interface. Right now we assume that topics are // immutable, therefore there is no update topic RPC call. There are two ways to // delete a topic - archiving it makes the topic readonly so that no events can be // published to it, but it can still be read. Destroying the topic deletes it and // removes all of its data, freeing up the topic name to be used again. ListTopics(ctx context.Context, in *PageInfo, opts ...grpc.CallOption) (*TopicsPage, error) CreateTopic(ctx context.Context, in *Topic, opts ...grpc.CallOption) (*Topic, error) DeleteTopic(ctx context.Context, in *TopicMod, opts ...grpc.CallOption) (*TopicTombstone, error) // Implements a client-side heartbeat that can also be used by monitoring tools. Status(ctx context.Context, in *HealthCheck, opts ...grpc.CallOption) (*ServiceState, error) }
EnsignClient is the client API for Ensign 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 NewEnsignClient ¶
func NewEnsignClient(cc grpc.ClientConnInterface) EnsignClient
type EnsignServer ¶
type EnsignServer interface { // Both the Publish and Subscribe RPCs are bidirectional streaming to allow for acks // and nacks of events to be sent between Ensign and the client. The Publish stream // is opened and the client sends events and receives acks/nacks -- when the client // closes the publish stream, the server sends back information about the current // state of the topic. When the Subscribe stream is opened, the client must send an // open stream message with the subscription info before receiving events. Once it // receives events it must send back acks/nacks up the stream so that Ensign // advances the topic offset for the rest of the clients in the group. Publish(Ensign_PublishServer) error Subscribe(Ensign_SubscribeServer) error // This is a simple topic management interface. Right now we assume that topics are // immutable, therefore there is no update topic RPC call. There are two ways to // delete a topic - archiving it makes the topic readonly so that no events can be // published to it, but it can still be read. Destroying the topic deletes it and // removes all of its data, freeing up the topic name to be used again. ListTopics(context.Context, *PageInfo) (*TopicsPage, error) CreateTopic(context.Context, *Topic) (*Topic, error) DeleteTopic(context.Context, *TopicMod) (*TopicTombstone, error) // Implements a client-side heartbeat that can also be used by monitoring tools. Status(context.Context, *HealthCheck) (*ServiceState, error) // contains filtered or unexported methods }
EnsignServer is the server API for Ensign service. All implementations must embed UnimplementedEnsignServer for forward compatibility
type Ensign_PublishClient ¶
type Ensign_PublishClient interface { Send(*Event) error Recv() (*Publication, error) grpc.ClientStream }
type Ensign_PublishServer ¶
type Ensign_PublishServer interface { Send(*Publication) error Recv() (*Event, error) grpc.ServerStream }
type Ensign_SubscribeClient ¶
type Ensign_SubscribeClient interface { Send(*Subscription) error Recv() (*Event, error) grpc.ClientStream }
type Ensign_SubscribeServer ¶
type Ensign_SubscribeServer interface { Send(*Event) error Recv() (*Subscription, error) grpc.ServerStream }
type Event ¶
type Event struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` TopicId string `protobuf:"bytes,2,opt,name=topic_id,json=topicId,proto3" json:"topic_id,omitempty"` Mimetype v1beta1.MIME `protobuf:"varint,3,opt,name=mimetype,proto3,enum=mimetype.v1beta1.MIME" json:"mimetype,omitempty"` Type *Type `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` Encryption *Encryption `protobuf:"bytes,6,opt,name=encryption,proto3" json:"encryption,omitempty"` Compression *Compression `protobuf:"bytes,7,opt,name=compression,proto3" json:"compression,omitempty"` Geography *Region `protobuf:"bytes,8,opt,name=geography,proto3" json:"geography,omitempty"` Publisher *Publisher `protobuf:"bytes,9,opt,name=publisher,proto3" json:"publisher,omitempty"` Created *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=created,proto3" json:"created,omitempty"` Committed *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=committed,proto3" json:"committed,omitempty"` // contains filtered or unexported fields }
Event is a high level wrapper for a datagram that is totally ordered by the Ensign event-driven framework. Events are simply blobs of data and associated metadata that can be published by a producer, inserted into a log, and consumed by a subscriber. The mimetype of the event allows subscribers to deserialize the data into a specific format such as JSON or protocol buffers. The type acts as a key for heterogeneous topics and can also be used to lookup schema information for data validation. TODO: do we need to allow for event keys or is the type sufficient? TODO: how should we implement the event IDs, should we use a time based mechanism like ksuid? TODO: is this too nested? should we flatten some of the inner types?
func (*Event) Descriptor
deprecated
func (*Event) GetCommitted ¶
func (x *Event) GetCommitted() *timestamppb.Timestamp
func (*Event) GetCompression ¶
func (x *Event) GetCompression() *Compression
func (*Event) GetCreated ¶
func (x *Event) GetCreated() *timestamppb.Timestamp
func (*Event) GetEncryption ¶
func (x *Event) GetEncryption() *Encryption
func (*Event) GetGeography ¶
func (*Event) GetMimetype ¶
func (*Event) GetPublisher ¶
func (*Event) GetTopicId ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type HealthCheck ¶
type HealthCheck struct { // The number of failed health checks that proceeded the current check. Attempts uint32 `protobuf:"varint,1,opt,name=attempts,proto3" json:"attempts,omitempty"` // The timestamp of the last health check, successful or otherwise. LastCheckedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_checked_at,json=lastCheckedAt,proto3" json:"last_checked_at,omitempty"` // contains filtered or unexported fields }
func (*HealthCheck) Descriptor
deprecated
func (*HealthCheck) Descriptor() ([]byte, []int)
Deprecated: Use HealthCheck.ProtoReflect.Descriptor instead.
func (*HealthCheck) GetAttempts ¶
func (x *HealthCheck) GetAttempts() uint32
func (*HealthCheck) GetLastCheckedAt ¶
func (x *HealthCheck) GetLastCheckedAt() *timestamppb.Timestamp
func (*HealthCheck) ProtoMessage ¶
func (*HealthCheck) ProtoMessage()
func (*HealthCheck) ProtoReflect ¶
func (x *HealthCheck) ProtoReflect() protoreflect.Message
func (*HealthCheck) Reset ¶
func (x *HealthCheck) Reset()
func (*HealthCheck) String ¶
func (x *HealthCheck) String() string
type Nack ¶
type Nack struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Code uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
Nack means that an event could not be handled or committed. This datatype should be small so that throughput is not affected and generally only conains the id of the event and the error code describing what went wrong. Longer error messages are optional and should only be used when something abnormal has occurred. The Ensign server will return a Nack if the event could not be appended to the log. Clients should return a Nack if the event couldn't be handled or processed so that Ensign ensures another client retrieves the event.
func (*Nack) Descriptor
deprecated
func (*Nack) ProtoMessage ¶
func (*Nack) ProtoMessage()
func (*Nack) ProtoReflect ¶
func (x *Nack) ProtoReflect() protoreflect.Message
type OpenStream ¶
type OpenStream struct { Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` Group string `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` // contains filtered or unexported fields }
OpenStream is the first message that should be sent in a Subscribe stream as it defines what topic the client is subscribing to and how it will process the events.
func (*OpenStream) Descriptor
deprecated
func (*OpenStream) Descriptor() ([]byte, []int)
Deprecated: Use OpenStream.ProtoReflect.Descriptor instead.
func (*OpenStream) GetGroup ¶
func (x *OpenStream) GetGroup() string
func (*OpenStream) GetTopic ¶
func (x *OpenStream) GetTopic() string
func (*OpenStream) ProtoMessage ¶
func (*OpenStream) ProtoMessage()
func (*OpenStream) ProtoReflect ¶
func (x *OpenStream) ProtoReflect() protoreflect.Message
func (*OpenStream) Reset ¶
func (x *OpenStream) Reset()
func (*OpenStream) String ¶
func (x *OpenStream) String() string
type PageInfo ¶
type PageInfo struct { PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
A basic request for paginated list queries.
func (*PageInfo) Descriptor
deprecated
func (*PageInfo) GetNextPageToken ¶
func (*PageInfo) GetPageSize ¶
func (*PageInfo) ProtoMessage ¶
func (*PageInfo) ProtoMessage()
func (*PageInfo) ProtoReflect ¶
func (x *PageInfo) ProtoReflect() protoreflect.Message
type Publication ¶
type Publication struct { // Types that are assignable to Embed: // // *Publication_Ack // *Publication_Nack // *Publication_CloseStream Embed isPublication_Embed `protobuf_oneof:"embed"` // contains filtered or unexported fields }
Publication messages are sent back to publishers from the server. Generally they are responses to receiving events (e.g. ack and nack) but the last message contains information about the performance of the publisher and the topic itself.
func (*Publication) Descriptor
deprecated
func (*Publication) Descriptor() ([]byte, []int)
Deprecated: Use Publication.ProtoReflect.Descriptor instead.
func (*Publication) GetAck ¶
func (x *Publication) GetAck() *Ack
func (*Publication) GetCloseStream ¶
func (x *Publication) GetCloseStream() *CloseStream
func (*Publication) GetEmbed ¶
func (m *Publication) GetEmbed() isPublication_Embed
func (*Publication) GetNack ¶
func (x *Publication) GetNack() *Nack
func (*Publication) ProtoMessage ¶
func (*Publication) ProtoMessage()
func (*Publication) ProtoReflect ¶
func (x *Publication) ProtoReflect() protoreflect.Message
func (*Publication) Reset ¶
func (x *Publication) Reset()
func (*Publication) String ¶
func (x *Publication) String() string
type Publication_Ack ¶
type Publication_Ack struct {
Ack *Ack `protobuf:"bytes,1,opt,name=ack,proto3,oneof"`
}
type Publication_CloseStream ¶
type Publication_CloseStream struct {
CloseStream *CloseStream `protobuf:"bytes,3,opt,name=close_stream,json=closeStream,proto3,oneof"`
}
type Publication_Nack ¶
type Publication_Nack struct {
Nack *Nack `protobuf:"bytes,2,opt,name=nack,proto3,oneof"`
}
type Publisher ¶
type Publisher struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` Ipaddr string `protobuf:"bytes,2,opt,name=ipaddr,proto3" json:"ipaddr,omitempty"` // contains filtered or unexported fields }
Information about the publisher of the event for provenance and auditing purposes. TODO: this is only partially implemented
func (*Publisher) Descriptor
deprecated
func (*Publisher) GetClientId ¶
func (*Publisher) ProtoMessage ¶
func (*Publisher) ProtoMessage()
func (*Publisher) ProtoReflect ¶
func (x *Publisher) ProtoReflect() protoreflect.Message
type Region ¶
type Region struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Geographic metadata for compliance and region-awareness. TODO: this is only partially implemented
func (*Region) Descriptor
deprecated
func (*Region) ProtoMessage ¶
func (*Region) ProtoMessage()
func (*Region) ProtoReflect ¶
func (x *Region) ProtoReflect() protoreflect.Message
type ServiceState ¶
type ServiceState struct { // Current service status as defined by the recieving system. The system is obliged // to respond with the closest matching status in a best-effort fashion. Alerts will // be triggered on service status changes if the system does not respond and the // previous system state was not unknown. Status ServiceState_Status `protobuf:"varint,1,opt,name=status,proto3,enum=ensign.v1beta1.ServiceState_Status" json:"status,omitempty"` // The current version of the node running the Ensign service Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // How long the node has been up and running since it was last rebooted Uptime *durationpb.Duration `protobuf:"bytes,3,opt,name=uptime,proto3" json:"uptime,omitempty"` // Hint to the client when to check the health status again. NotBefore *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=not_before,json=notBefore,proto3" json:"not_before,omitempty"` NotAfter *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=not_after,json=notAfter,proto3" json:"not_after,omitempty"` // contains filtered or unexported fields }
func (*ServiceState) Descriptor
deprecated
func (*ServiceState) Descriptor() ([]byte, []int)
Deprecated: Use ServiceState.ProtoReflect.Descriptor instead.
func (*ServiceState) GetNotAfter ¶
func (x *ServiceState) GetNotAfter() *timestamppb.Timestamp
func (*ServiceState) GetNotBefore ¶
func (x *ServiceState) GetNotBefore() *timestamppb.Timestamp
func (*ServiceState) GetStatus ¶
func (x *ServiceState) GetStatus() ServiceState_Status
func (*ServiceState) GetUptime ¶
func (x *ServiceState) GetUptime() *durationpb.Duration
func (*ServiceState) GetVersion ¶
func (x *ServiceState) GetVersion() string
func (*ServiceState) ProtoMessage ¶
func (*ServiceState) ProtoMessage()
func (*ServiceState) ProtoReflect ¶
func (x *ServiceState) ProtoReflect() protoreflect.Message
func (*ServiceState) Reset ¶
func (x *ServiceState) Reset()
func (*ServiceState) String ¶
func (x *ServiceState) String() string
type ServiceState_Status ¶
type ServiceState_Status int32
const ( ServiceState_UNKNOWN ServiceState_Status = 0 ServiceState_HEALTHY ServiceState_Status = 1 ServiceState_UNHEALTHY ServiceState_Status = 2 ServiceState_DANGER ServiceState_Status = 3 ServiceState_OFFLINE ServiceState_Status = 4 ServiceState_MAINTENANCE ServiceState_Status = 5 )
func (ServiceState_Status) Descriptor ¶
func (ServiceState_Status) Descriptor() protoreflect.EnumDescriptor
func (ServiceState_Status) Enum ¶
func (x ServiceState_Status) Enum() *ServiceState_Status
func (ServiceState_Status) EnumDescriptor
deprecated
func (ServiceState_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use ServiceState_Status.Descriptor instead.
func (ServiceState_Status) Number ¶
func (x ServiceState_Status) Number() protoreflect.EnumNumber
func (ServiceState_Status) String ¶
func (x ServiceState_Status) String() string
func (ServiceState_Status) Type ¶
func (ServiceState_Status) Type() protoreflect.EnumType
type Subscription ¶
type Subscription struct { // Types that are assignable to Embed: // // *Subscription_Ack // *Subscription_Nack // *Subscription_OpenStream Embed isSubscription_Embed `protobuf_oneof:"embed"` // contains filtered or unexported fields }
Subscription messages are sent to the server from subscribers. Generally they are responses to receiving events (e.g. ack and nack) but the first message must contain subscription information about the topic and the group so that Ensign can start sending the client events from the specified topic down the stream.
func (*Subscription) Descriptor
deprecated
func (*Subscription) Descriptor() ([]byte, []int)
Deprecated: Use Subscription.ProtoReflect.Descriptor instead.
func (*Subscription) GetAck ¶
func (x *Subscription) GetAck() *Ack
func (*Subscription) GetEmbed ¶
func (m *Subscription) GetEmbed() isSubscription_Embed
func (*Subscription) GetNack ¶
func (x *Subscription) GetNack() *Nack
func (*Subscription) GetOpenStream ¶
func (x *Subscription) GetOpenStream() *OpenStream
func (*Subscription) ProtoMessage ¶
func (*Subscription) ProtoMessage()
func (*Subscription) ProtoReflect ¶
func (x *Subscription) ProtoReflect() protoreflect.Message
func (*Subscription) Reset ¶
func (x *Subscription) Reset()
func (*Subscription) String ¶
func (x *Subscription) String() string
type Subscription_Ack ¶
type Subscription_Ack struct {
Ack *Ack `protobuf:"bytes,1,opt,name=ack,proto3,oneof"`
}
type Subscription_Nack ¶
type Subscription_Nack struct {
Nack *Nack `protobuf:"bytes,2,opt,name=nack,proto3,oneof"`
}
type Subscription_OpenStream ¶
type Subscription_OpenStream struct {
OpenStream *OpenStream `protobuf:"bytes,3,opt,name=open_stream,json=openStream,proto3,oneof"`
}
type Topic ¶
type Topic struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Types []*Type `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"` Regions []*Region `protobuf:"bytes,4,rep,name=regions,proto3" json:"regions,omitempty"` Readonly bool `protobuf:"varint,14,opt,name=readonly,proto3" json:"readonly,omitempty"` Created *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=created,proto3" json:"created,omitempty"` // contains filtered or unexported fields }
Topics are collections of related events and the events inside of a topic are totally ordered by ID and their log index. Topics must define the event types and regions that they are operated on, which will allow Ensign to determine how to distribute the topic over multiple nodes. Users must use the topic ID to connect to a publish or subscribe stream. Users can create and delete topics, but for the current implementation, topics are immutable -- meaning that they cannot be changed. Topics can be deleted in two ways: they can be archived (making them readonly) or they can be destroyed, which removes the name of the topic and all the events in the topic.
func (*Topic) Descriptor
deprecated
func (*Topic) GetCreated ¶
func (x *Topic) GetCreated() *timestamppb.Timestamp
func (*Topic) GetReadonly ¶
func (*Topic) GetRegions ¶
func (*Topic) ProtoMessage ¶
func (*Topic) ProtoMessage()
func (*Topic) ProtoReflect ¶
func (x *Topic) ProtoReflect() protoreflect.Message
type TopicMod ¶
type TopicMod struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Operation TopicMod_Operation `protobuf:"varint,2,opt,name=operation,proto3,enum=ensign.v1beta1.TopicMod_Operation" json:"operation,omitempty"` // contains filtered or unexported fields }
A topic modification operation to archive or destroy the topic.
func (*TopicMod) Descriptor
deprecated
func (*TopicMod) GetOperation ¶
func (x *TopicMod) GetOperation() TopicMod_Operation
func (*TopicMod) ProtoMessage ¶
func (*TopicMod) ProtoMessage()
func (*TopicMod) ProtoReflect ¶
func (x *TopicMod) ProtoReflect() protoreflect.Message
type TopicMod_Operation ¶
type TopicMod_Operation int32
const ( TopicMod_NOOP TopicMod_Operation = 0 TopicMod_ARCHIVE TopicMod_Operation = 1 // makes the topic readonly TopicMod_DESTROY TopicMod_Operation = 2 // deletes the topic and removes all of its data )
func (TopicMod_Operation) Descriptor ¶
func (TopicMod_Operation) Descriptor() protoreflect.EnumDescriptor
func (TopicMod_Operation) Enum ¶
func (x TopicMod_Operation) Enum() *TopicMod_Operation
func (TopicMod_Operation) EnumDescriptor
deprecated
func (TopicMod_Operation) EnumDescriptor() ([]byte, []int)
Deprecated: Use TopicMod_Operation.Descriptor instead.
func (TopicMod_Operation) Number ¶
func (x TopicMod_Operation) Number() protoreflect.EnumNumber
func (TopicMod_Operation) String ¶
func (x TopicMod_Operation) String() string
func (TopicMod_Operation) Type ¶
func (TopicMod_Operation) Type() protoreflect.EnumType
type TopicTombstone ¶
type TopicTombstone struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` State TopicTombstone_Status `protobuf:"varint,2,opt,name=state,proto3,enum=ensign.v1beta1.TopicTombstone_Status" json:"state,omitempty"` // contains filtered or unexported fields }
A temporary representation of the topic state, e.g. was it modified to be readonly or is it in the process of being deleted. Once deleted the topic is permenantly gone.
func (*TopicTombstone) Descriptor
deprecated
func (*TopicTombstone) Descriptor() ([]byte, []int)
Deprecated: Use TopicTombstone.ProtoReflect.Descriptor instead.
func (*TopicTombstone) GetId ¶
func (x *TopicTombstone) GetId() string
func (*TopicTombstone) GetState ¶
func (x *TopicTombstone) GetState() TopicTombstone_Status
func (*TopicTombstone) ProtoMessage ¶
func (*TopicTombstone) ProtoMessage()
func (*TopicTombstone) ProtoReflect ¶
func (x *TopicTombstone) ProtoReflect() protoreflect.Message
func (*TopicTombstone) Reset ¶
func (x *TopicTombstone) Reset()
func (*TopicTombstone) String ¶
func (x *TopicTombstone) String() string
type TopicTombstone_Status ¶
type TopicTombstone_Status int32
const ( TopicTombstone_UNKNOWN TopicTombstone_Status = 0 TopicTombstone_READONLY TopicTombstone_Status = 1 TopicTombstone_DELETING TopicTombstone_Status = 2 )
func (TopicTombstone_Status) Descriptor ¶
func (TopicTombstone_Status) Descriptor() protoreflect.EnumDescriptor
func (TopicTombstone_Status) Enum ¶
func (x TopicTombstone_Status) Enum() *TopicTombstone_Status
func (TopicTombstone_Status) EnumDescriptor
deprecated
func (TopicTombstone_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use TopicTombstone_Status.Descriptor instead.
func (TopicTombstone_Status) Number ¶
func (x TopicTombstone_Status) Number() protoreflect.EnumNumber
func (TopicTombstone_Status) String ¶
func (x TopicTombstone_Status) String() string
func (TopicTombstone_Status) Type ¶
func (TopicTombstone_Status) Type() protoreflect.EnumType
type TopicsPage ¶
type TopicsPage struct { Topics []*Topic `protobuf:"bytes,1,rep,name=topics,proto3" json:"topics,omitempty"` NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
A list of paginated topics the user can use to identify topic ids to subscribe to.
func (*TopicsPage) Descriptor
deprecated
func (*TopicsPage) Descriptor() ([]byte, []int)
Deprecated: Use TopicsPage.ProtoReflect.Descriptor instead.
func (*TopicsPage) GetNextPageToken ¶
func (x *TopicsPage) GetNextPageToken() string
func (*TopicsPage) GetTopics ¶
func (x *TopicsPage) GetTopics() []*Topic
func (*TopicsPage) ProtoMessage ¶
func (*TopicsPage) ProtoMessage()
func (*TopicsPage) ProtoReflect ¶
func (x *TopicsPage) ProtoReflect() protoreflect.Message
func (*TopicsPage) Reset ¶
func (x *TopicsPage) Reset()
func (*TopicsPage) String ¶
func (x *TopicsPage) String() string
type Type ¶
type Type struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
An event type is composed of a name and a version so that the type can be looked up in the schema registry. The schema can then be used to validate the data inside the event. Schemas are optional but types are not unless the mimetype requries a schema for deserialization (e.g. protobuf, parquet, avro, etc.).
func (*Type) Descriptor
deprecated
func (*Type) GetVersion ¶
func (*Type) ProtoMessage ¶
func (*Type) ProtoMessage()
func (*Type) ProtoReflect ¶
func (x *Type) ProtoReflect() protoreflect.Message
type UnimplementedEnsignServer ¶
type UnimplementedEnsignServer struct { }
UnimplementedEnsignServer must be embedded to have forward compatible implementations.
func (UnimplementedEnsignServer) CreateTopic ¶
func (UnimplementedEnsignServer) DeleteTopic ¶
func (UnimplementedEnsignServer) DeleteTopic(context.Context, *TopicMod) (*TopicTombstone, error)
func (UnimplementedEnsignServer) ListTopics ¶
func (UnimplementedEnsignServer) ListTopics(context.Context, *PageInfo) (*TopicsPage, error)
func (UnimplementedEnsignServer) Publish ¶
func (UnimplementedEnsignServer) Publish(Ensign_PublishServer) error
func (UnimplementedEnsignServer) Status ¶
func (UnimplementedEnsignServer) Status(context.Context, *HealthCheck) (*ServiceState, error)
func (UnimplementedEnsignServer) Subscribe ¶
func (UnimplementedEnsignServer) Subscribe(Ensign_SubscribeServer) error
type UnsafeEnsignServer ¶
type UnsafeEnsignServer interface {
// contains filtered or unexported methods
}
UnsafeEnsignServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EnsignServer will result in compilation errors.