util

package
v0.0.0-...-0d7ecfb Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ScheduledReason is set when the report is running due to it's schedule
	// and the current time is beyond the next reporting period end.
	ScheduledReason = "Scheduled"

	// RunImmediatelyReason is set when the report is running because it's
	// spec.runImmediately is true.
	RunImmediatelyReason = "RunImmediately"

	// ReportingPeriodWaitingReason is set when a report is not running because it is
	// waiting for the next period of time in it's schedule to elapse.
	ReportingPeriodWaitingReason = "ReportingPeriodWaiting"

	// ReportFinishedReason is set in the report has generated report results
	// for all periods between reportingStart and reportingEnd, according to
	// it's configured schedule. Run-once reports are finished after their
	// execution.
	ReportFinishedReason = "Finished"

	// InvalidReportReason is added to a Report when the
	// Report is invalid or it's ReportQuery is invalid.
	InvalidReportReason = "InvalidReport"

	// ReportingPeriodUnmetDependenciesReason is set when a Report cannot run
	// because it's dependencies (ReportQueries dependencies on
	// ReportDataSources, ReportQueries, and other Reports) do not
	// have data available for the reporting period currently being processed.
	ReportingPeriodUnmetDependenciesReason = "ReportingPeriodUnmetDependencies"

	// GenerateReportFailedReason is set when a Report is not running because
	// it previously failed when generating results previously.
	GenerateReportFailedReason = "GenerateReportFailed"
)

Variables

This section is empty.

Functions

func GetReportCondition

func GetReportCondition(status metering.ReportStatus, condType metering.ReportConditionType) *metering.ReportCondition

GetReportCondition returns the condition with the provided type.

func NewReportCondition

func NewReportCondition(condType metering.ReportConditionType, status v1.ConditionStatus, reason, message string) *metering.ReportCondition

NewReportCondition creates a new report condition.

func RemoveReportCondition

func RemoveReportCondition(status *metering.ReportStatus, condType metering.ReportConditionType) error

RemoveReportCondition removes the report condition with the provided type.

func SetReportCondition

func SetReportCondition(status *metering.ReportStatus, condition metering.ReportCondition) error

SetReportCondition updates the report to include the provided condition. If the condition that we are about to add already exists and has the same status and reason then we are not going to update.

Types

This section is empty.

Jump to

Keyboard shortcuts

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