monitor

package
v2.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VolumeResourceType = "volume"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EventContent

type EventContent struct {
	// LastRecord is a reference to the most recent Kubernetes
	// event for a specific resource
	LatestRecord *corev1.Event
}

type IMonitorService

type IMonitorService interface {
	// Reads the array secret from the filepath and populates array.Locker
	// with array info and API clients.
	UpdateArrays(arrayConfigFilepath string, fs fs.Interface) error
	// Starts the service, polling for PowerStore Alerts and Events
	// every pollPeriod.
	Start(ctx context.Context, pollPeriod time.Duration)
}

func NewMonitorService

func NewMonitorService(ctx context.Context) (IMonitorService, error)

NewMonitorService creates a new monitor service. The Kubernetes client is created using the environment var, identifiers.EnvKubeConfigPath, or in-cluster config, and used to create the EventRecorder and EventBroadcaster.

type PersistentVolumeEvent

type PersistentVolumeEvent struct {
	EventContent

	Volume corev1.PersistentVolume
}

PersistentVolumeEvent relates a Persistent Volume struct to its most recent Kubernetes event.

type Service

type Service struct {
	EventRecorder    record.EventRecorderLogger
	EventBroadcaster record.EventBroadcaster

	array.Locker
	// contains filtered or unexported fields
}

Service represents the volume event monitoring service

func (*Service) Start

func (s *Service) Start(ctx context.Context, pollPeriod time.Duration)

Start starts monitoring volumes and logging kubernetes events for alerts associated with Persistent Volumes backed by the PowerStore array(s).

Jump to

Keyboard shortcuts

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