reporting

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Reporting focuses on reporting Events, Status Conditions, and the like to users.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReportDeletionBlockedDueToDependents

func ReportDeletionBlockedDueToDependents(
	ctx context.Context, logger *capnslog.PackageLogger, client client.Client, obj statusConditionGetter, deps *dependents.DependentList,
) error

ReportDeletionBlockedDueToDependents reports that deletion of a Rook-Ceph object is blocked due to the given dependents in 3 ways: 1. to the given logger 2. as a condition on the object (added to the object's conditions list given) 3. as the returned error which should be included in the FailedReconcile message

func ReportDeletionNotBlockedDueToDependents

func ReportDeletionNotBlockedDueToDependents(
	ctx context.Context, logger *capnslog.PackageLogger, client client.Client, recorder record.EventRecorder, obj statusConditionGetter,
)

ReportDeletionNotBlockedDueToDependents reports that deletion of a Rook-Ceph object is proceeding and NOT blocked due to dependents in 3 ways: 1. to the given logger 2. as an event on the object (via the given event recorder) 3. as a condition on the object (added to the object's conditions list given)

func ReportReconcileResult

func ReportReconcileResult(
	logger *capnslog.PackageLogger,
	recorder record.EventRecorder,
	reconcileRequest reconcile.Request,
	obj client.Object,
	reconcileResponse reconcile.Result,
	err error,
) (reconcile.Result, error)

ReportReconcileResult will report the result of an object's reconcile in 2 ways: 1. to the given logger 2. as an event on the object (via the given event recorder)

The results of the object's reconcile should include the object (NEVER NIL), the reconcile response, and the error returned by the reconcile.

The reconcile request is used to reference a given object that doesn't have a name.

The function is designed to return the appropriate values needed for the controller-runtime framework's Reconcile() method.

func UpdateStatus

func UpdateStatus(client client.Client, obj client.Object) error

UpdateStatus updates an object with a given status. The object is updated with the latest version from the server on a successful update.

func UpdateStatusCondition

func UpdateStatusCondition(
	client client.Client, obj statusConditionGetter, newCond cephv1.Condition,
) error

UpdateStatusCondition updates (or adds to) the status condition to the given object. The object is updated with the latest version from the server on a successful update.

Types

This section is empty.

Jump to

Keyboard shortcuts

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