api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
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.

View Source
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)

View Source
var File_ensign_v1beta1_ensign_proto protoreflect.FileDescriptor
View Source
var File_ensign_v1beta1_event_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Ack.ProtoReflect.Descriptor instead.

func (*Ack) GetCommitted

func (x *Ack) GetCommitted() *timestamppb.Timestamp

func (*Ack) GetId

func (x *Ack) GetId() string

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 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) Descriptor() ([]byte, []int)

Deprecated: Use Event.ProtoReflect.Descriptor instead.

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

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

func (*Event) GetEncryption

func (x *Event) GetEncryption() *Encryption

func (*Event) GetGeography

func (x *Event) GetGeography() *Region

func (*Event) GetId

func (x *Event) GetId() string

func (*Event) GetMimetype

func (x *Event) GetMimetype() v1beta1.MIME

func (*Event) GetPublisher

func (x *Event) GetPublisher() *Publisher

func (*Event) GetTopicId

func (x *Event) GetTopicId() string

func (*Event) GetType

func (x *Event) GetType() *Type

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 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) Descriptor() ([]byte, []int)

Deprecated: Use Nack.ProtoReflect.Descriptor instead.

func (*Nack) GetCode

func (x *Nack) GetCode() uint32

func (*Nack) GetError

func (x *Nack) GetError() string

func (*Nack) GetId

func (x *Nack) GetId() string

func (*Nack) ProtoMessage

func (*Nack) ProtoMessage()

func (*Nack) ProtoReflect

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

func (*Nack) Reset

func (x *Nack) Reset()

func (*Nack) String

func (x *Nack) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use PageInfo.ProtoReflect.Descriptor instead.

func (*PageInfo) GetNextPageToken

func (x *PageInfo) GetNextPageToken() string

func (*PageInfo) GetPageSize

func (x *PageInfo) GetPageSize() uint32

func (*PageInfo) ProtoMessage

func (*PageInfo) ProtoMessage()

func (*PageInfo) ProtoReflect

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

func (*PageInfo) Reset

func (x *PageInfo) Reset()

func (*PageInfo) String

func (x *PageInfo) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Publisher.ProtoReflect.Descriptor instead.

func (*Publisher) GetClientId

func (x *Publisher) GetClientId() string

func (*Publisher) GetIpaddr

func (x *Publisher) GetIpaddr() string

func (*Publisher) ProtoMessage

func (*Publisher) ProtoMessage()

func (*Publisher) ProtoReflect

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

func (*Publisher) Reset

func (x *Publisher) Reset()

func (*Publisher) String

func (x *Publisher) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Region.ProtoReflect.Descriptor instead.

func (*Region) GetName

func (x *Region) GetName() string

func (*Region) ProtoMessage

func (*Region) ProtoMessage()

func (*Region) ProtoReflect

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

func (*Region) Reset

func (x *Region) Reset()

func (*Region) String

func (x *Region) String() string

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

func (ServiceState_Status) EnumDescriptor deprecated

func (ServiceState_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use ServiceState_Status.Descriptor instead.

func (ServiceState_Status) Number

func (ServiceState_Status) String

func (x ServiceState_Status) String() string

func (ServiceState_Status) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Topic.ProtoReflect.Descriptor instead.

func (*Topic) GetCreated

func (x *Topic) GetCreated() *timestamppb.Timestamp

func (*Topic) GetId

func (x *Topic) GetId() string

func (*Topic) GetName

func (x *Topic) GetName() string

func (*Topic) GetReadonly

func (x *Topic) GetReadonly() bool

func (*Topic) GetRegions

func (x *Topic) GetRegions() []*Region

func (*Topic) GetTypes

func (x *Topic) GetTypes() []*Type

func (*Topic) ProtoMessage

func (*Topic) ProtoMessage()

func (*Topic) ProtoReflect

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

func (*Topic) Reset

func (x *Topic) Reset()

func (*Topic) String

func (x *Topic) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use TopicMod.ProtoReflect.Descriptor instead.

func (*TopicMod) GetId

func (x *TopicMod) GetId() string

func (*TopicMod) GetOperation

func (x *TopicMod) GetOperation() TopicMod_Operation

func (*TopicMod) ProtoMessage

func (*TopicMod) ProtoMessage()

func (*TopicMod) ProtoReflect

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

func (*TopicMod) Reset

func (x *TopicMod) Reset()

func (*TopicMod) String

func (x *TopicMod) String() string

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

func (TopicMod_Operation) EnumDescriptor deprecated

func (TopicMod_Operation) EnumDescriptor() ([]byte, []int)

Deprecated: Use TopicMod_Operation.Descriptor instead.

func (TopicMod_Operation) Number

func (TopicMod_Operation) String

func (x TopicMod_Operation) String() string

func (TopicMod_Operation) Type

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

func (TopicTombstone_Status) EnumDescriptor deprecated

func (TopicTombstone_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use TopicTombstone_Status.Descriptor instead.

func (TopicTombstone_Status) Number

func (TopicTombstone_Status) String

func (x TopicTombstone_Status) String() string

func (TopicTombstone_Status) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Type.ProtoReflect.Descriptor instead.

func (*Type) GetName

func (x *Type) GetName() string

func (*Type) GetVersion

func (x *Type) GetVersion() uint32

func (*Type) ProtoMessage

func (*Type) ProtoMessage()

func (*Type) ProtoReflect

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

func (*Type) Reset

func (x *Type) Reset()

func (*Type) String

func (x *Type) String() string

type UnimplementedEnsignServer

type UnimplementedEnsignServer struct {
}

UnimplementedEnsignServer must be embedded to have forward compatible implementations.

func (UnimplementedEnsignServer) CreateTopic

func (UnimplementedEnsignServer) DeleteTopic

func (UnimplementedEnsignServer) ListTopics

func (UnimplementedEnsignServer) Publish

func (UnimplementedEnsignServer) Status

func (UnimplementedEnsignServer) Subscribe

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.

Jump to

Keyboard shortcuts

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