metrics

package
v0.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsPort = 5000
)

Variables

This section is empty.

Functions

func RecordVolumeMountAttempt

func RecordVolumeMountAttempt(volumeType, path string, status Status)

RecordVolumeMountAttempt records a volume mount attempt

func RecordVolumeUnMountAttempt

func RecordVolumeUnMountAttempt(status Status)

RecordVolumeUnMountAttempt records a volume unmount attempt

Types

type MetricsServer

type MetricsServer interface {
	// Start runs the metrics server.
	// This should be a blocking call until the context is cancelled or done.
	Start(ctx context.Context, errChan chan error)
}

MetricsServer is the metrics server interface

func NewMetricsServer

func NewMetricsServer(port int) (MetricsServer, error)

NewMetricsServer creates a new metrics server

type Status

type Status string

Status represents the status of an operation

const (
	// StatusSuccess represents the success of an operation
	StatusSuccess Status = "success"
	// StatusFailed represents the failure of an operation
	StatusFailed = "failed"
)

Jump to

Keyboard shortcuts

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