metricsstore

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FamilyStringer

type FamilyStringer interface {
	String() string
}

FamilyStringer represents a metric family that can be converted to its string representation.

type MetricsStore

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

MetricsStore implements the k8s.io/kubernetes/client-go/tools/cache.Store interface. Instead of storing entire Kubernetes objects, it stores metrics generated based on those objects.

func NewMetricsStore

func NewMetricsStore(headers []string, generateFunc func(interface{}) []FamilyStringer) *MetricsStore

NewMetricsStore returns a new MetricsStore

func (*MetricsStore) Add

func (s *MetricsStore) Add(obj interface{}) error

TODO: Proper comments on all functions below.

func (*MetricsStore) Delete

func (s *MetricsStore) Delete(obj interface{}) error

func (*MetricsStore) Get

func (s *MetricsStore) Get(obj interface{}) (item interface{}, exists bool, err error)

func (*MetricsStore) GetByKey

func (s *MetricsStore) GetByKey(key string) (item interface{}, exists bool, err error)

func (*MetricsStore) List

func (s *MetricsStore) List() []interface{}

func (*MetricsStore) ListKeys

func (s *MetricsStore) ListKeys() []string

func (*MetricsStore) Replace

func (s *MetricsStore) Replace(list []interface{}, _ string) error

Replace will delete the contents of the store, using instead the given list.

func (*MetricsStore) Resync

func (s *MetricsStore) Resync() error

func (*MetricsStore) Update

func (s *MetricsStore) Update(obj interface{}) error

func (*MetricsStore) WriteAll

func (s *MetricsStore) WriteAll(w io.Writer)

WriteAll writes all metrics of the store into the given writer, zipped with the help text of each metric family.

Jump to

Keyboard shortcuts

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