metrics

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentLibraryItemMetrics added in v1.8.1

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

func NewContentLibraryItemMetrics added in v1.8.1

func NewContentLibraryItemMetrics() *ContentLibraryItemMetrics

NewContentLibraryItemMetrics initializes a singleton and registers all the defined metrics.

func (*ContentLibraryItemMetrics) DeleteMetrics added in v1.8.1

func (m *ContentLibraryItemMetrics) DeleteMetrics(logger logr.Logger, vmiName, ns string)

DeleteMetrics deletes all the related ContentLibraryItem metrics from the given name and namespace.

func (*ContentLibraryItemMetrics) RegisterVMIContentSync added in v1.8.1

func (m *ContentLibraryItemMetrics) RegisterVMIContentSync(logger logr.Logger, vmiName, ns string, success bool)

RegisterVMIContentSync registers vmi content sync status metrics. If success is true, it sets the value to 1 else to 0.

func (*ContentLibraryItemMetrics) RegisterVMIResourceResolve added in v1.8.1

func (m *ContentLibraryItemMetrics) RegisterVMIResourceResolve(logger logr.Logger, vmiName, ns string, success bool)

RegisterVMIResourceResolve registers vmi resource resolve status metrics. If success is true, it sets the value to 1 else to 0.

type ContentSourceMetrics

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

func NewContentSourceMetrics

func NewContentSourceMetrics() *ContentSourceMetrics

NewContentSourceMetrics initializes a singleton and registers all the defined metrics.

func (*ContentSourceMetrics) DeleteMetrics

func (csm *ContentSourceMetrics) DeleteMetrics(logger logr.Logger, providerRef vmopv1.ContentProviderReference)

DeleteMetrics deletes the related metrics from the given ContentProviderReference.

func (*ContentSourceMetrics) RegisterVMImageCreateOrUpdate

func (csm *ContentSourceMetrics) RegisterVMImageCreateOrUpdate(logger logr.Logger, vmImage vmopv1.VirtualMachineImage, success bool)

RegisterVMImageCreateOrUpdate registers the metrics for the given VMImage. If success is true, it sets the value to 1 else to 0.

func (*ContentSourceMetrics) RegisterVMImageDelete

func (csm *ContentSourceMetrics) RegisterVMImageDelete(logger logr.Logger, vmImage vmopv1.VirtualMachineImage, success bool)

RegisterVMImageDelete registers the metrics for the given VMImage delete operation. If success is true, it deletes the metric; otherwise, it sets the value to -1.

type PublishResult

type PublishResult int
const (
	PublishFailed     PublishResult = -1
	PublishInProgress PublishResult = 0
	PublishSucceeded  PublishResult = 1
)

type VMMetrics

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

func NewVMMetrics

func NewVMMetrics() *VMMetrics

func (*VMMetrics) DeleteMetrics

func (vmm *VMMetrics) DeleteMetrics(vmCtx *context.VirtualMachineContext)

DeleteMetrics deletes metrics for a specific VM post deletion reconcile. It is critical to stop reporting metrics for a deleted VM resource.

func (*VMMetrics) RegisterVMCreateOrUpdateMetrics

func (vmm *VMMetrics) RegisterVMCreateOrUpdateMetrics(vmCtx *context.VirtualMachineContext)

type VMPublishMetrics

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

func NewVMPublishMetrics

func NewVMPublishMetrics() *VMPublishMetrics

NewVMPublishMetrics initializes a singleton and registers all the defined metrics.

func (*VMPublishMetrics) DeleteMetrics

func (m *VMPublishMetrics) DeleteMetrics(logger logr.Logger, reqName, ns string)

DeleteMetrics deletes all the related VM publish request metrics from the given name and namespace.

func (*VMPublishMetrics) RegisterVMPublishRequest

func (m *VMPublishMetrics) RegisterVMPublishRequest(logger logr.Logger, reqName, ns string, val PublishResult)

RegisterVMPublishRequest registers VM publish request metrics with the given value.

Jump to

Keyboard shortcuts

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