status

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IngestStatus

type IngestStatus struct {
	Status  IngestStatusChoice `json:"status"`
	Message *string            `json:"message,omitempty"`

	// LastIngested event into the broker.
	LastIngested *time.Time `json:"lastIngested,omitempty"`
}

func (*IngestStatus) EqualSoftStatus

func (is *IngestStatus) EqualSoftStatus(in *IngestStatus) bool

func (*IngestStatus) EqualStatus

func (is *IngestStatus) EqualStatus(in *IngestStatus) bool

type IngestStatusChoice

type IngestStatusChoice string
const (
	// The ingest has been created and is able to receive events.
	IngestStatusReady IngestStatusChoice = "Ready"
	// The ingest has started receiving events.
	IngestStatusRunning IngestStatusChoice = "Running"
	// The ingest has been closed.
	IngestStatusClosed IngestStatusChoice = "Closed"
)

type Manager

type Manager interface {
	UpdateIngestStatus(is *IngestStatus)
	EnsureSubscription(name string, ss *SubscriptionStatus)
	EnsureNoSubscription(name string)
}

type Status

type Status struct {
	// More information on Duration format:
	//  - https://www.iso.org/iso-8601-date-and-time-format.html
	//  - https://en.wikipedia.org/wiki/ISO_8601
	LastUpdated   *time.Time                     `json:"lastUpdated,omitempty"`
	Ingest        IngestStatus                   `json:"ingest,omitempty"`
	Subscriptions map[string]*SubscriptionStatus `json:"subscriptions,omitempty"`
}

Status of a broker instance.

func (*Status) EqualSoftStatus

func (s *Status) EqualSoftStatus(in *Status) bool

EqualSoftStatus compares two status instances core event data, not taking into account timestamps at each structure level.

This function is not thread safe, it is up to the caller to make sure structures are not concurrently modified.

func (*Status) EqualStatus

func (s *Status) EqualStatus(in *Status) bool

EqualSoftStatus compares verbatim two status instances.

This function is not thread safe, it is up to the caller to make sure structures are not concurrently modified.

type SubscriptionStatus

type SubscriptionStatus struct {
	Status  SubscriptionStatusChoice `json:"status"`
	Message *string                  `json:"message,omitempty"`

	LastProcessed *time.Time `json:"lastProcessed,omitempty"`
}

func (*SubscriptionStatus) EqualSoftStatus

func (ss *SubscriptionStatus) EqualSoftStatus(in *SubscriptionStatus) bool

func (*SubscriptionStatus) EqualStatus

func (ss *SubscriptionStatus) EqualStatus(in *SubscriptionStatus) bool

func (*SubscriptionStatus) Merge

func (ss *SubscriptionStatus) Merge(in *SubscriptionStatus)

type SubscriptionStatusChoice

type SubscriptionStatusChoice string
const (
	// The subscription has been created and is able to process events.
	SubscriptionStatusReady SubscriptionStatusChoice = "Ready"
	// The subscription has started processing events.
	SubscriptionStatusRunning SubscriptionStatusChoice = "Running"
	// The subscription could not be created.
	SubscriptionStatusFailed SubscriptionStatusChoice = "Failed"
	// The subscription will not receive further events and can be deleted.
	SubscriptionStatusComplete SubscriptionStatusChoice = "Complete"
)

Jump to

Keyboard shortcuts

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