types

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncMetricCreator

type AsyncMetricCreator interface {
	AsyncInt64() asyncint64.InstrumentProvider
	AsyncFloat64() asyncfloat64.InstrumentProvider
}

AsyncMetricCreator to create AsyncInt64/AsyncFloat64 InstrumentProvider

type LeaderElector

type LeaderElector interface {
	InitLeaderElection(string, string) error
	IsLeader() bool
}

LeaderElector will elect a leader

type MetricsRecorder

type MetricsRecorder interface {
	RecordNumericMetrics(ctx context.Context, metric []NumericMetric) error
}

MetricsRecorder supports recording storage resources metrics

type NumericMetric

type NumericMetric struct {
	Labels []attribute.KeyValue
	Name   string
	Value  float64
}

NumericMetric numeric metric struct

type PowerMaxArray

type PowerMaxArray struct {
	Endpoint       string
	StorageArrayID string
	Username       string
	Password       string
	Insecure       bool
	IsPrimary      bool
	IsActive       bool
	Client         PowerMaxClient
}

PowerMaxArray is a struct that stores all PowerMax connection information. It stores gopowermax client that can be directly used to invoke PowerSale API calls. This structure is supposed to be parsed from config and mainly is created by GetPowerScaleArrays function.

type PowerMaxClient

type PowerMaxClient interface {
	Authenticate(ctx context.Context, configConnect *pmax.ConfigConnect) error
	GetStorageGroup(ctx context.Context, symID string, storageGroupID string) (*types.StorageGroup, error)
	GetVolumeByID(ctx context.Context, symID string, volumeID string) (*types.Volume, error)
	GetArrayPerfKeys(ctx context.Context) (*types.ArrayKeysResult, error)
	GetVolumesMetrics(ctx context.Context, symID string, storageGroups string, metricsQuery []string, firstAvailableTime,
		lastAvailableTime int64) (*types.VolumeMetricsIterator, error)
	GetStorageGroupPerfKeys(ctx context.Context, symID string) (*types.StorageGroupKeysResult, error)
	GetStorageGroupMetrics(ctx context.Context, symID string, storageGroupID string, metricsQuery []string,
		firstAvailableTime, lastAvailableTime int64) (*types.StorageGroupMetricsIterator, error)
}

PowerMaxClient contains operations for accessing the PowerMax API

type Service

type Service interface {
	GetLogger() *logrus.Logger
	GetPowerMaxClients() map[string][]PowerMaxArray
	GetMetricsRecorder() MetricsRecorder
	GetMaxPowerMaxConnections() int
	GetVolumeFinder() VolumeFinder
	ExportCapacityMetrics(ctx context.Context)
	ExportPerformanceMetrics(ctx context.Context)
}

Service aggregate necessary info and define export metrics methods

type StorageClassFinder

type StorageClassFinder interface {
	GetStorageClasses(context.Context) ([]v1.StorageClass, error)
}

StorageClassFinder is used to find storage classes in kubernetes

type StorageGroupPerfMetricsRecord

type StorageGroupPerfMetricsRecord struct {
	ArrayID, StorageGroupID                                                                           string
	HostMBReads, HostMBWritten, ReadResponseTime, WriteResponseTime, HostReads, HostWrites, AvgIOSize float64
}

StorageGroupPerfMetricsRecord struct for storage group performance

type VolumeCapacityMetricsRecord

type VolumeCapacityMetricsRecord struct {
	ArrayID, VolumeID, SrpID, StorageGroupID                                                                 string
	StorageClass, Driver, PersistentVolumeName, PersistentVolumeStatus, PersistentVolumeClaimName, Namespace string
	Total, Used, UsedPercent                                                                                 float64
}

VolumeCapacityMetricsRecord struct for volume capacity

type VolumeFinder

type VolumeFinder interface {
	GetPersistentVolumes(context.Context) ([]k8s.VolumeInfo, error)
}

VolumeFinder is used to find volume information in kubernetes

type VolumePerfMetricsRecord

type VolumePerfMetricsRecord struct {
	ArrayID, VolumeID, StorageGroupID                                                string
	StorageClass, Driver, PersistentVolumeName, PersistentVolumeClaimName, Namespace string
	MBRead, MBWritten, ReadResponseTime, WriteResponseTime, Reads, Writes            float64
}

VolumePerfMetricsRecord struct for volume performance

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
asyncfloat64mock
Package asyncfloat64mock is a generated GoMock package.
Package asyncfloat64mock is a generated GoMock package.
asyncint64mock
Package asyncint64mock is a generated GoMock package.
Package asyncint64mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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