Documentation ¶
Index ¶
- Constants
- Variables
- func AddToLabelMap(key string, value string, labelPath map[string]string)
- func CalculateScrapeIntervals() (err error)
- func CamelCase(elements ...string) string
- func CheckPrometheusUp() (n int)
- func CollectAndProcessMetric(query string, promRange *v1.Range, matrixFunc ClusterMatrixFunc) (n int, err error)
- func CollectAndProcessMetricErrorLogLevel(callDepth int, query string, promRange *v1.Range, matrixFunc ClusterMatrixFunc, ...) (n int, err error)
- func ConditionalPrintCSVLabelMap(file *os.File, labelMap map[string]string, last bool, ...) (err error)
- func Contains[K, V comparable](m map[K]V, k K, v V) bool
- func DebugLogMemStats(callDepth int, msg string)
- func DebugLogObjectMemStats(obj string)
- func DromedaryCase(elements ...string) string
- func Eval(n int, eval bool) int
- func FatalError(err error, format string, v ...any)
- func FilterTerminatedContainers(prefix, suffix string) string
- func Format(t *time.Time) string
- func FormatCurrentTime() string
- func FormatTime(mt model.Time) string
- func FormatTimeInSec(i int64) string
- func Found(indicators map[string]int, indicator string, eval bool) bool
- func FoundCounter(n int) (res []bool)
- func FoundIndicatorCounter(indicators map[string]int, indicator string) []bool
- func GetConditionalMetricsWorkload(indicators map[string]int, indicator string, ...)
- func GetCsvHeaderFormat(entityKind string, subject string) (format string, f bool)
- func GetExtraFileNameByType(cluster, entityKind string, ft FileType) string
- func GetFileName(cluster, entityKind, fileName string) string
- func GetFileNameByType(cluster, entityKind string, ft FileType) string
- func GetLabelValue(ss *model.SampleStream, name string) (s string, b bool)
- func GetLabelsValues(ss *model.SampleStream, names []string) (m map[string]string, b bool)
- func GetPrometheusVersion() (version string, found bool)
- func GetValue(ss *model.SampleStream, name string) (s string)
- func GetWorkload(callDepth int, fileName, metricName, query string, ...)
- func GetWorkloadQueryVariants(callDepth int, fileName, metricName string, ...)
- func GetWorkloadQueryVariantsFieldConversion(callDepth int, fileName, metricName string, ...)
- func InitLogs()
- func InitWorkloadFile(cluster, fileName, entityKind, csvHeaderFormat, metricName string) *os.File
- func IntMCores[N Number](n N) int
- func IntMiB[N Number](n N) int
- func IsMetricPresent(cluster, metricName string) bool
- func IsSubset[K, V comparable](m, sub map[K]V) bool
- func IsValidValue(value *model.SamplePair) bool
- func Join(sep string, elements ...string) string
- func JoinComma(elements ...string) string
- func JoinDot(elements ...string) string
- func JoinNoSep(elements ...string) string
- func JoinSpace(elements ...string) string
- func KeySet[K comparable, V any](m map[K]V) (keys []K)
- func KnownValueFunc(n int) bool
- func LastSampleValue(ss *model.SampleStream) (value model.SampleValue)
- func LastValue(ss *model.SampleStream) float64
- func LogAll(callDepth int, level LogLevel, format string, v ...any)
- func LogCluster(callDepth int, level LogLevel, format string, cluster string, toStdOut bool, ...)
- func LogError(err error, format string, v ...any)
- func LogErrorWithLevel(callDepth int, level LogLevel, err error, format string, v ...any)
- func MCores[N Number](n N) N
- func Merge[K comparable, V any](m1, m2 map[K]V, mds MergeDuplicateStrategy) (m map[K]V, err error)
- func MiB[N Number](n N) N
- func MkdirAll() error
- func NumClusters() int
- func Plural(s string) string
- func PositiveValueFunc(n int) bool
- func PrintCSVIntValue(file *os.File, value int, last bool) error
- func PrintCSVIntValueConditional(file *os.File, value int, last bool, f IntValueFunc) error
- func PrintCSVJoinedStringValue(file *os.File, value string, sep string, last bool) error
- func PrintCSVLabelMap(file *os.File, labelMap map[string]string, last bool) error
- func PrintCSVPositiveIntValue(file *os.File, value int, last bool) error
- func PrintCSVStringValue(file *os.File, value string, last bool) (err error)
- func PrintCSVTimeValue(file *os.File, value *time.Time, last bool) error
- func ProcessResults(callDepth int, resultMap ClusterResultMap, err error, query string, ...)
- func ProcessResultsErrorLogLevel(callDepth int, resultMap ClusterResultMap, err error, query string, ...)
- func RegisterClusterFilters(cfps []*cconf.ClusterFilterParameters) error
- func RegisterClusterQueryExclusion(ce ClusterQueryExclusion)
- func ReplaceColons(s string) string
- func ReplaceSemiColons(s string) string
- func ReplaceSemiColonsPipes(s string) string
- func ResolveMetrics(m ResolveMetricMap) (err error)
- func SetCurrentTime()
- func Singular(s string) string
- func SnakeCase(elements ...string) string
- func SortSlice[T constraints.Ordered](s []T)
- func SortedKeySet[K constraints.Ordered, V any](m map[K]V) (keys []K)
- func TimeRange() (promRange *v1.Range)
- func TimeRangeEndTimeOnly() (promRange *v1.Range)
- func TimeRangeForInterval(historyInterval time.Duration) (promRange *v1.Range)
- func TimeRangeForIntervals(historyInterval, absoluteStep time.Duration, target PrometheusApiCall) (promRange *v1.Range)
- func ToPrometheusLabelName(s string) string
- func ToPrometheusLabelNameList(list string) string
- func WriteValues(file io.Writer, clusterName, fields string, values []model.SamplePair, ...) error
- func WriteWorkload(wp WorkloadProducer, wws WorkloadWriters, wmh *WorkloadMetricHolder, ...)
- type ClusterFilter
- type ClusterLeveledLogger
- func (cll *ClusterLeveledLogger) Debug(msg string, keysAndValues ...interface{})
- func (cll *ClusterLeveledLogger) Error(msg string, keysAndValues ...interface{})
- func (cll *ClusterLeveledLogger) Info(msg string, keysAndValues ...interface{})
- func (cll *ClusterLeveledLogger) Warn(msg string, keysAndValues ...interface{})
- type ClusterMatrixFunc
- type ClusterQueryExclusion
- type ClusterResultMap
- type ClusterWorkloadWriters
- type ConvFunc
- type FieldProvider
- type FieldsFunc
- type FileType
- type IntValueFunc
- type LogLevel
- type MergeDuplicateStrategy
- type MetricTimeAndValuesProvider
- type NameType
- type Number
- type ObservabilityPlatform
- type PrometheusApiCall
- type QueryProcessor
- type QueryProvider
- type ResolveMetricFunc
- type ResolveMetricMap
- type Result
- type TimeAndValues
- type WorkloadMetricHolder
- func (wmh *WorkloadMetricHolder) GetFileName() string
- func (wmh *WorkloadMetricHolder) GetMetricName() string
- func (wmh *WorkloadMetricHolder) GetName(nt NameType, singular bool) (name string)
- func (wmh *WorkloadMetricHolder) GetWorkload(query string, metricField []model.LabelName, entityKind string)
- func (wmh *WorkloadMetricHolder) GetWorkloadQueryVariants(callDepth int, qps map[string]*QueryProcessor, entityKind string)
- func (wmh *WorkloadMetricHolder) OverrideFileName(nameElements ...string) *WorkloadMetricHolder
- type WorkloadProducer
- type WorkloadQueryWrapper
- type WorkloadWriters
Constants ¶
const ( ClusterEntityKind = "cluster" NodeEntityKind = Node ContainerEntityKind = Container CrqEntityKind = "crq" RqEntityKind = "rq" Quota = "quota" Hpa = "hpa" )
EntityKinds
const ( Empty = cconf.Empty Cpu = "cpu" Memory = "memory" Mem = "mem" Disk = "disk" Net = "net" Limit = "limit" Request = "request" Capacity = "capacity" Allocatable = "allocatable" Resource = "resource" Namespace = "namespace" Type = "type" Hard = "hard" Used = "used" Count = "count" Node = "node" Instance = "instance" Speed = "speed" Utilization = "utilization" Reservation = "reservation" Percent = "percent" Workload = "workload" Actual = "actual" Raw = "raw" Read = "read" Write = "write" Received = "received" Sent = "sent" Total = "total" Bytes = "bytes" Ops = "ops" Packets = "packets" Current = "current" Size = "size" Group = "group" Name = "name" Entity = "entity" Metric = "metric" Time = "time" Pod = "pod" Container = "container" Replica = "replica" Daemon = "daemon" Stateful = "stateful" Set = "set" Job = "job" Cron = "cron" Deployment = "deployment" Replication = "replication" Controller = "controller" Owner = "owner" Kind = "kind" Running = "Running" Terminated = "Terminated" Day = "day" Hour = "hour" Label = "label" Max = "max" Avg = "avg" Average = "average" Min = "min" Sum = "sum" MCoresSt = "mcores" Extra = "extra" Bearer = "Bearer" InfoSt = "info" ConfigSt = "config" Map = "map" Catalog = "catalog" Source = "source" Oom = "oom" Kill = "kill" Event = "event" Throttling = "throttling" Second = "second" Rollout = "rollout" Analysis = "analysis" Run = "run" App = "app" Nil = "<nil>" Key = "key" Value = "value" Effect = "effect" )
const ( Or = "|" Comma = cconf.Comma Dot = cconf.Dot Slash = cconf.Slash Space = " " Underscore = "_" Braces = leftBrace + rightBrace Brackets = leftBracket + rightBracket )
const ( LabelNamesPlaceholder = `LNPH` NonNameString = `#//#` EntityFormat = "entity=%s" ClusterFileFormat = "cluster=%s file=%s" )
const ( ClusterFormat = "cluster=%s" DefaultLogFormat = ClusterFormat + Space + "entity=%s" )
const ( QueryFormat = "metric=%s query=%s" ClusterQueryFormat = ClusterFormat + Space + QueryFormat )
const (
FilterTerminatedContainersClause = "" /* 163-byte string literal not displayed */
)
const (
UnknownValue = -1
)
Variables ¶
var ( NodeGroupEntityKind = SnakeCase(Node, Group) HpaEntityKind = SnakeCase(ContainerEntityKind, Hpa) )
var ( PodOwner = CamelCase(Pod) DeploymentOwner = CamelCase(Deployment) JobOwner = CamelCase(Job) NodeOwner = CamelCase(Node) ReplicaSetOwner = CamelCase(Replica, Set) DaemonSetOwner = CamelCase(Daemon, Set) StatefulSetOwner = CamelCase(Stateful, Set) ReplicationControllerOwner = CamelCase(Replication, Controller) CronJobOwner = CamelCase(Cron, Job) ConfigMapOwner = CamelCase(ConfigSt, Map) // openshift CatalogSourceOwner = CamelCase(Catalog, Source) // openshift / Operator Framework RolloutOwner = CamelCase(Rollout) // Argo AnalysisRunOwner = CamelCase(Analysis, Run) // Argo )
owner kind labels
var ( Limits = Plural(Limit) Requests = Plural(Request) Pods = Plural(Pod) CpuLimit = DromedaryCase(Cpu, Limit) LimitsCpu = JoinDot(Limits, Cpu) MemLimit = DromedaryCase(Memory, Limit) LimitsMem = JoinDot(Limits, Memory) CpuRequest = DromedaryCase(Cpu, Request) RequestsCpu = JoinDot(Requests, Cpu) MemRequest = DromedaryCase(Memory, Request) RequestsMem = JoinDot(Requests, Memory) CpuCapacity = DromedaryCase(Cpu, Capacity) MemCapacity = DromedaryCase(Memory, Capacity) PodsCapacity = DromedaryCase(Pods, Capacity) CpuAllocatable = DromedaryCase(Cpu, Allocatable) MemAllocatable = DromedaryCase(Memory, Allocatable) PodsAllocatable = DromedaryCase(Pods, Allocatable) CountPods = Join(Slash, Count, Pods) NetSpeedBytes = DromedaryCase(Net, Speed, Bytes) ReplicaSet = strings.ToLower(ReplicaSetOwner) DaemonSet = strings.ToLower(DaemonSetOwner) StatefulSet = strings.ToLower(StatefulSetOwner) ReplicationController = strings.ToLower(ReplicationControllerOwner) CronJob = strings.ToLower(CronJobOwner) AnalysisRun = strings.ToLower(AnalysisRunOwner) Replicas = Plural(Replica) Days = Plural(Day) Hours = Plural(Hour) Labels = Plural(Label) CurrentSizeName = DromedaryCase(CurrentSize.GetMetricName()) NodeGroupInclude = JoinNoSep(Node, Group) Events = Plural(Event) Seconds = Plural(Second) Asterisk = "*" )
these are practically constants but as they use functions they need to be vars
var ( CpuUtilization = NewWorkloadMetricHolder(Cpu, Utilization) MemoryBytes = NewWorkloadMetricHolder(Memory, Bytes).OverrideFileName(Memory, Raw, Bytes) MemoryActualWorkload = NewWorkloadMetricHolder(Memory, Actual, Workload) DiskReadBytes = NewWorkloadMetricHolder(Disk, Read, Bytes) DiskWriteBytes = NewWorkloadMetricHolder(Disk, Write, Bytes) DiskTotalBytes = NewWorkloadMetricHolder(Disk, Total, Bytes) DiskReadOps = NewWorkloadMetricHolder(Disk, Read, Ops) DiskWriteOps = NewWorkloadMetricHolder(Disk, Write, Ops) DiskTotalOps = NewWorkloadMetricHolder(Disk, Total, Ops) NetReceivedBytes = NewWorkloadMetricHolder(Net, Received, Bytes) NetSentBytes = NewWorkloadMetricHolder(Net, Sent, Bytes) NetTotalBytes = NewWorkloadMetricHolder(Net, Total, Bytes) NetReceivedPackets = NewWorkloadMetricHolder(Net, Received, Packets) NetSentPackets = NewWorkloadMetricHolder(Net, Sent, Packets) NetTotalPackets = NewWorkloadMetricHolder(Net, Total, Packets) CurrentSize = NewWorkloadMetricHolder(Current, Size) CpuLimits = NewWorkloadMetricHolder(Cpu, Limits) CpuRequests = NewWorkloadMetricHolder(Cpu, Requests) MemoryLimits = NewWorkloadMetricHolder(Memory, Limits) MemoryRequests = NewWorkloadMetricHolder(Memory, Requests) MemLimits = NewWorkloadMetricHolder(Mem, Limits) MemRequests = NewWorkloadMetricHolder(Mem, Requests) PodsLimits = NewWorkloadMetricHolder(Pods, Limits).OverrideFileName(Pods) CpuReservationPercent = NewWorkloadMetricHolder(Cpu, Reservation, Percent) MemoryReservationPercent = NewWorkloadMetricHolder(Memory, Reservation, Percent) PodCount = NewWorkloadMetricHolder(Pod, Count) OomKillEvents = NewWorkloadMetricHolder(Oom, Kill, Events) CpuThrottlingEvents = NewWorkloadMetricHolder(Cpu, Throttling, Events) )
common WorkloadMetricHolder structs
var BoolValues = []bool{true, false}
var CurrentTime time.Time
var Interval time.Duration
var Params *cconf.Parameters
var Step time.Duration
var Version string
globals
Functions ¶
func AddToLabelMap ¶
AddToLabelMap is used to add values to label map used for attributes
func CalculateScrapeIntervals ¶
func CalculateScrapeIntervals() (err error)
func CheckPrometheusUp ¶
func CheckPrometheusUp() (n int)
func CollectAndProcessMetric ¶
func Contains ¶
func Contains[K, V comparable](m map[K]V, k K, v V) bool
func DebugLogMemStats ¶
func DebugLogObjectMemStats ¶
func DebugLogObjectMemStats(obj string)
func DromedaryCase ¶
func FatalError ¶
func FormatCurrentTime ¶
func FormatCurrentTime() string
func FormatTime ¶
func FormatTimeInSec ¶
func FoundCounter ¶
func FoundIndicatorCounter ¶
func GetCsvHeaderFormat ¶
func GetExtraFileNameByType ¶
func GetFileName ¶
func GetFileNameByType ¶
func GetLabelValue ¶
func GetLabelValue(ss *model.SampleStream, name string) (s string, b bool)
func GetLabelsValues ¶
func GetPrometheusVersion ¶
func GetWorkload ¶
func GetWorkload(callDepth int, fileName, metricName, query string, metricFields []model.LabelName, entityKind string, subject string, tvp QueryProvider)
GetWorkload used to query for the workload data and then calls write workload
func GetWorkloadQueryVariants ¶
func GetWorkloadQueryVariants(callDepth int, fileName, metricName string, queryProcessors map[string]*QueryProcessor, entityKind string, subject string, tvp QueryProvider)
func GetWorkloadQueryVariantsFieldConversion ¶
func GetWorkloadQueryVariantsFieldConversion(callDepth int, fileName, metricName string, queryProcessors map[string]*QueryProcessor, entityKind string, subject string, qp QueryProvider)
func InitWorkloadFile ¶
func IsMetricPresent ¶
func IsSubset ¶
func IsSubset[K, V comparable](m, sub map[K]V) bool
func IsValidValue ¶
func IsValidValue(value *model.SamplePair) bool
func KeySet ¶
func KeySet[K comparable, V any](m map[K]V) (keys []K)
KeySet returns the key set of m, nil if m is empty or nil
func KnownValueFunc ¶
func LastSampleValue ¶
func LastSampleValue(ss *model.SampleStream) (value model.SampleValue)
func LastValue ¶
func LastValue(ss *model.SampleStream) float64
func LogCluster ¶
func LogErrorWithLevel ¶
func Merge ¶
func Merge[K comparable, V any](m1, m2 map[K]V, mds MergeDuplicateStrategy) (m map[K]V, err error)
func NumClusters ¶
func NumClusters() int
func PositiveValueFunc ¶
func PrintCSVLabelMap ¶
func PrintCSVStringValue ¶
func ProcessResults ¶
func ProcessResults(callDepth int, resultMap ClusterResultMap, err error, query string, matrixFunc ClusterMatrixFunc)
func ProcessResultsErrorLogLevel ¶
func ProcessResultsErrorLogLevel(callDepth int, resultMap ClusterResultMap, err error, query string, matrixFunc ClusterMatrixFunc, level LogLevel)
func RegisterClusterFilters ¶
func RegisterClusterFilters(cfps []*cconf.ClusterFilterParameters) error
func RegisterClusterQueryExclusion ¶
func RegisterClusterQueryExclusion(ce ClusterQueryExclusion)
func ReplaceColons ¶
func ReplaceSemiColons ¶
func ReplaceSemiColonsPipes ¶
func ResolveMetrics ¶
func ResolveMetrics(m ResolveMetricMap) (err error)
func SetCurrentTime ¶
func SetCurrentTime()
func SortSlice ¶
func SortSlice[T constraints.Ordered](s []T)
func SortedKeySet ¶
func SortedKeySet[K constraints.Ordered, V any](m map[K]V) (keys []K)
func TimeRange ¶
TimeRange allows you to define the start and end values of the range will pass to the Prometheus for the query
func TimeRangeEndTimeOnly ¶
func TimeRangeForInterval ¶
func TimeRangeForIntervals ¶
func TimeRangeForIntervals(historyInterval, absoluteStep time.Duration, target PrometheusApiCall) (promRange *v1.Range)
func ToPrometheusLabelName ¶
ToPrometheusLabelName is actually a copy of https://github.com/kubernetes/kube-state-metrics/blob/main/internal/store/utils.go#L125 and added here to prevent dependency on that package for one function only; cannot use SnakeCase() as proper snake case treats a number as a new word (e.g. "group1" -> "group_1"), whereas ksm's toSnakeCase() does not (e.g. "group1" -> "group1"),
func WriteValues ¶
func WriteValues(file io.Writer, clusterName, fields string, values []model.SamplePair, qp QueryProvider) error
func WriteWorkload ¶
func WriteWorkload(wp WorkloadProducer, wws WorkloadWriters, wmh *WorkloadMetricHolder, ss *model.SampleStream, f ConvFunc[float64])
Types ¶
type ClusterFilter ¶
type ClusterFilter struct {
// contains filtered or unexported fields
}
func NewClusterFilter ¶
func NewClusterFilter(cfp *cconf.ClusterFilterParameters) *ClusterFilter
type ClusterLeveledLogger ¶
type ClusterLeveledLogger struct {
// contains filtered or unexported fields
}
ClusterLeveledLogger implements rhttp.LeveledLogger to avoid clutter
func (*ClusterLeveledLogger) Debug ¶
func (cll *ClusterLeveledLogger) Debug(msg string, keysAndValues ...interface{})
func (*ClusterLeveledLogger) Error ¶
func (cll *ClusterLeveledLogger) Error(msg string, keysAndValues ...interface{})
func (*ClusterLeveledLogger) Info ¶
func (cll *ClusterLeveledLogger) Info(msg string, keysAndValues ...interface{})
func (*ClusterLeveledLogger) Warn ¶
func (cll *ClusterLeveledLogger) Warn(msg string, keysAndValues ...interface{})
type ClusterMatrixFunc ¶
type ClusterQueryExclusion ¶
type ClusterResultMap ¶
func CollectMetric ¶
func CollectMetric(callDepth int, query string, promRange *v1.Range) (crm ClusterResultMap, n int, err error)
CollectMetric is used to query Prometheus to get data for specific query and return the results to be processed
type ClusterWorkloadWriters ¶
type FieldProvider ¶
type FieldProvider struct { Cluster string MetricFields []model.LabelName ConvF FieldsFunc QProv QueryProvider }
type IntValueFunc ¶
type MergeDuplicateStrategy ¶
type MergeDuplicateStrategy int
const ( Fail MergeDuplicateStrategy = iota Ignore Override )
type MetricTimeAndValuesProvider ¶
type MetricTimeAndValuesProvider struct { }
func (*MetricTimeAndValuesProvider) CalculateRange ¶
func (mtvp *MetricTimeAndValuesProvider) CalculateRange(historyInterval int) *v1.Range
func (*MetricTimeAndValuesProvider) TimeAndValues ¶
func (mtvp *MetricTimeAndValuesProvider) TimeAndValues(value *model.SamplePair) *TimeAndValues
type Number ¶
Number - Ideally we would define Number as
type Number interface { constraints.Integer | constraints.Float }
However, this doesn't work, as in some cases we have arithmetic expressions involving constant values which exceed int8, int16, unit8, uint16 - therefore we need to exclude these types (to avoid compilation errors). In addition, constraints.Integer (specifically constraints.Unsigned) includes ~uintptr which we want to exclude as well.
type ObservabilityPlatform ¶
type ObservabilityPlatform string
const ( UnknownPlatform ObservabilityPlatform = Empty AWSManagedPrometheus ObservabilityPlatform = "AWS Managed Prometheus" AzureMonitorManagedPrometheus ObservabilityPlatform = "Azure Monitor Managed Prometheus" GrafanaCloud ObservabilityPlatform = "Grafana Cloud" )
func GetObservabilityPlatform ¶
func GetObservabilityPlatform() ObservabilityPlatform
type PrometheusApiCall ¶
type PrometheusApiCall uint
const ( ApiQuery PrometheusApiCall ApiQueryRange ApiQueryExemplars )
func (PrometheusApiCall) String ¶
func (pac PrometheusApiCall) String() string
type QueryProcessor ¶
type QueryProcessor struct { MetricFields []model.LabelName FF FieldsFunc }
type QueryProvider ¶
type QueryProvider interface { TimeAndValues(value *model.SamplePair) *TimeAndValues CalculateRange(historyInterval int) *v1.Range }
type ResolveMetricFunc ¶
type ResolveMetricMap ¶
type ResolveMetricMap map[string]ResolveMetricFunc
type WorkloadMetricHolder ¶
type WorkloadMetricHolder struct {
// contains filtered or unexported fields
}
func NewWorkloadMetricHolder ¶
func NewWorkloadMetricHolder(nameElements ...string) *WorkloadMetricHolder
func (*WorkloadMetricHolder) GetFileName ¶
func (wmh *WorkloadMetricHolder) GetFileName() string
func (*WorkloadMetricHolder) GetMetricName ¶
func (wmh *WorkloadMetricHolder) GetMetricName() string
func (*WorkloadMetricHolder) GetName ¶
func (wmh *WorkloadMetricHolder) GetName(nt NameType, singular bool) (name string)
func (*WorkloadMetricHolder) GetWorkload ¶
func (wmh *WorkloadMetricHolder) GetWorkload(query string, metricField []model.LabelName, entityKind string)
func (*WorkloadMetricHolder) GetWorkloadQueryVariants ¶
func (wmh *WorkloadMetricHolder) GetWorkloadQueryVariants(callDepth int, qps map[string]*QueryProcessor, entityKind string)
func (*WorkloadMetricHolder) OverrideFileName ¶
func (wmh *WorkloadMetricHolder) OverrideFileName(nameElements ...string) *WorkloadMetricHolder
type WorkloadProducer ¶
type WorkloadQueryWrapper ¶
type WorkloadQueryWrapper struct {
Prefix, Suffix string
}
func (*WorkloadQueryWrapper) Wrap ¶
func (wqw *WorkloadQueryWrapper) Wrap(query string) string
type WorkloadWriters ¶
type WorkloadWriters map[string]ClusterWorkloadWriters
func NewWorkloadWriters ¶
func NewWorkloadWriters() WorkloadWriters
func (WorkloadWriters) AddMetricWorkloadWriters ¶
func (wws WorkloadWriters) AddMetricWorkloadWriters(wmhs ...*WorkloadMetricHolder)
func (WorkloadWriters) CloseAndClearWorkloadWriters ¶
func (wws WorkloadWriters) CloseAndClearWorkloadWriters(entityKind string)