kubernetes: k8s.io/kubernetes/pkg/controller/volume/persistentvolume/metrics Index | Files

package metrics

import "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/metrics"


Package Files


func RecordMetric Uses

func RecordMetric(key string, c *OperationStartTimeCache, err error)

RecordMetric records either an error count metric or a latency metric if there exists a start timestamp entry in the cache. For a successful operation, i.e., err == nil, the corresponding timestamp entry will be removed from cache

func RecordVolumeOperationErrorMetric Uses

func RecordVolumeOperationErrorMetric(pluginName, opName string)

RecordVolumeOperationErrorMetric records error count into metric volume_operation_total_errors for provisioning/deletion operations

func Register Uses

func Register(pvLister PVLister, pvcLister PVCLister, pluginMgr *volume.VolumePluginMgr)

Register all metrics for pv controller.

type OperationStartTimeCache Uses

type OperationStartTimeCache struct {
    // contains filtered or unexported fields

OperationStartTimeCache concurrent safe cache for operation start timestamps

func NewOperationStartTimeCache Uses

func NewOperationStartTimeCache() OperationStartTimeCache

NewOperationStartTimeCache creates a operation timestamp cache

func (*OperationStartTimeCache) AddIfNotExist Uses

func (c *OperationStartTimeCache) AddIfNotExist(key, pluginName, operationName string)

AddIfNotExist returns directly if there exists an entry with the key. Otherwise, it creates a new operation timestamp using operationName, pluginName, and current timestamp and stores the operation timestamp with the key

func (*OperationStartTimeCache) Delete Uses

func (c *OperationStartTimeCache) Delete(key string)

Delete deletes a value for a key.

func (*OperationStartTimeCache) Has Uses

func (c *OperationStartTimeCache) Has(key string) bool

Has returns a bool value indicates the existence of a key in the cache

type PVCLister Uses

type PVCLister interface {
    List() []interface{}

PVCLister used to list persistent volume claims.

type PVLister Uses

type PVLister interface {
    List() []interface{}

PVLister used to list persistent volumes.

Package metrics imports 7 packages (graph) and is imported by 21 packages. Updated 2020-11-11. Refresh now. Tools for package owners.