metrics

package
v2.0.0-...-345fa11 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeMetricGenFuncs

func ComposeMetricGenFuncs(familyGens []FamilyGenerator) func(interface{}, []*marketplacev1beta1.MeterDefinition) []FamilyByteSlicer

func ExtractMetricFamilyHeaders

func ExtractMetricFamilyHeaders(families []FamilyGenerator) []string

ExtractMetricFamilyHeaders takes in a slice of FamilyGenerator metrics and returns the extracted headers.

func GetAllMeterLabelsKeys

func GetAllMeterLabelsKeys(mdefs []*marketplacev1beta1.MeterDefinition) ([]string, []string)

func GetMeterDefLabelsKeys

func GetMeterDefLabelsKeys(mdef *marketplacev1beta1.MeterDefinition) ([]string, []string)

func MapMeterDefinitions

func MapMeterDefinitions(metrics []*kbsm.Metric, mdefs []*marketplacev1beta1.MeterDefinition) []*kbsm.Metric

Types

type FamilyByteSlicer

type FamilyByteSlicer interface {
	ByteSlice() []byte
}

type FamilyGenerator

type FamilyGenerator struct {
	GenerateMeterFunc func(interface{}, []*marketplacev1beta1.MeterDefinition) *kbsm.Family
	kbsmg.FamilyGenerator
}

type MeterDefinitionFetcher

type MeterDefinitionFetcher interface {
	GetMeterDefinitions(interface{}) ([]*marketplacev1beta1.MeterDefinition, error)
}

type PrometheusData

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

func ProvidePrometheusData

func ProvidePrometheusData() *PrometheusData

func (*PrometheusData) Add

func (p *PrometheusData) Add(obj interface{}, meterdefs []*marketplacev1beta1.MeterDefinition) error

func (*PrometheusData) Get

func (p *PrometheusData) Get(name string) *PrometheusDataMap

func (*PrometheusData) Remove

func (p *PrometheusData) Remove(obj interface{}) error

func (*PrometheusData) WriteAll

func (p *PrometheusData) WriteAll(w io.Writer) error

type PrometheusDataMap

type PrometheusDataMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func ProvideMeterDefPrometheusData

func ProvideMeterDefPrometheusData() *PrometheusDataMap

func ProvidePersistentVolumeClaimPrometheusData

func ProvidePersistentVolumeClaimPrometheusData() *PrometheusDataMap

func ProvidePodPrometheusData

func ProvidePodPrometheusData() *PrometheusDataMap

func ProvideServicePrometheusData

func ProvideServicePrometheusData() *PrometheusDataMap

func (*PrometheusDataMap) Add

func (s *PrometheusDataMap) Add(obj interface{}, meterdefs []*marketplacev1beta1.MeterDefinition) error

func (*PrometheusDataMap) Get

func (s *PrometheusDataMap) Get(obj interface{}) ([][]byte, bool, error)

func (*PrometheusDataMap) IsExpectedType

func (s *PrometheusDataMap) IsExpectedType(obj interface{}) bool

func (*PrometheusDataMap) Remove

func (s *PrometheusDataMap) Remove(obj interface{}) error

func (*PrometheusDataMap) WriteAll

func (s *PrometheusDataMap) WriteAll(w io.Writer) error

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