controllerstatus

package
v0.0.0-...-8498bf2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DownloadingReport specific flag for Smart Proxy report downloading process.
	DownloadingReport = Operation{Name: "DownloadingReport"}
	// Uploading specific flag for summary related to uploading process.
	Uploading = Operation{Name: "Uploading"}
	// GatheringReport specific for gathering the report from the cluster
	GatheringReport = Operation{Name: "GatheringReport"}
	// PullingSCACerts is specific operation for pulling the SCA certs data from the OCM API
	PullingSCACerts = Operation{Name: "PullingSCACerts"}
	// PullingClusterTransfer is an operator for pulling ClusterTransfer object from the OCM API endpoint
	PullingClusterTransfer = Operation{Name: "PullingClusterTransfer"}
	// RemoteConfigurationStatus is an operation of reading the remote configuration (provided by the conditional
	// gatherer endpoint)
	RemoteConfigurationStatus = Operation{Name: "RemoteConfigurationStatus"}
)

Functions

This section is empty.

Types

type Operation

type Operation struct {
	Name           OperationName
	HTTPStatusCode int
}

type OperationName

type OperationName string

type Simple

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

Simple represents the status of a given part of the operator

func (*Simple) CurrentStatus

func (s *Simple) CurrentStatus() (Summary, bool)

CurrentStatus retrives the status summary in a thread-safe way

func (*Simple) Name

func (s *Simple) Name() string

func (*Simple) UpdateStatus

func (s *Simple) UpdateStatus(summary Summary)

UpdateStatus updates the status, keeps track how long a status have been in effect

type StatusController

type StatusController interface {
	CurrentStatus() (summary Summary, ready bool)
	UpdateStatus(summary Summary)
	Name() string
}

func New

func New(name string) StatusController

type Summary

type Summary struct {
	Operation          Operation
	Healthy            bool
	Reason             string
	Message            string
	LastTransitionTime time.Time
	Count              int
}

Summary represents the status summary of an Operation

Jump to

Keyboard shortcuts

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