Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComposeMetricGenFuncs ¶
func ComposeMetricGenFuncs(familyGens []FamilyGenerator) func(obj interface{}) []metricsstore.FamilyByteSlicer
ComposeMetricGenFuncs takes a slice of metric families and returns a function that composes their metric generation functions into a single one.
func ExtractMetricFamilyHeaders ¶
func ExtractMetricFamilyHeaders(families []FamilyGenerator) []string
ExtractMetricFamilyHeaders takes in a slice of FamilyGenerator metrics and returns the extracted headers.
Types ¶
type FamilyGenerator ¶
type FamilyGenerator struct { Name string Help string Type Type GenerateFunc func(obj interface{}) *Family }
FamilyGenerator provides everything needed to generate a metric family with a Kubernetes object.
func FilterMetricFamilies ¶
func FilterMetricFamilies(l whiteBlackLister, families []FamilyGenerator) []FamilyGenerator
FilterMetricFamilies takes a white- and a blacklist and a slice of metric families and returns a filtered slice.
func (*FamilyGenerator) Generate ¶
func (g *FamilyGenerator) Generate(obj interface{}) *Family
Generate calls the FamilyGenerator.GenerateFunc and gives the family its name. The reasoning behind injecting the name at such a late point in time is deduplication in the code, preventing typos made by developers as well as saving memory.