Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultTaskrunLevel determines to what level to aggregate metrics // when it isn't specified in configmap DefaultTaskrunLevel = TaskrunLevelAtTask // TaskrunLevelAtTask specify that aggregation will be done at task level TaskrunLevelAtTask = "task" // TaskrunLevelAtNS specify that aggregation will be done at namespace level TaskrunLevelAtNS = "namespace" // DefaultPipelinerunLevel determines to what level to aggregate metrics // when it isn't specified in configmap DefaultPipelinerunLevel = PipelinerunLevelAtPipeline // PipelinerunLevelAtPipeline specify that aggregation will be done at // pipeline level PipelinerunLevelAtPipeline = "pipeline" // PipelinerunLevelAtNS specify that aggregation will be done at // namespace level PipelinerunLevelAtNS = "namespace" // DefaultDurationTaskrunType determines what type // of metrics to use when we don't specify one in // configmap DefaultDurationTaskrunType = "histogram" // DurationTaskrunTypeHistogram specify that histogram // type metrics need to be used for Duration of Taskrun DurationTaskrunTypeHistogram = "histogram" // DurationTaskrunTypeLastValue specify that lastValue or // gauge type metrics need to be used for Duration of Taskrun DurationTaskrunTypeLastValue = "lastvalue" // DefaultDurationPipelinerunType determines what type // of metrics to use when we don't specify one in // configmap DefaultDurationPipelinerunType = "histogram" // DurationPipelinerunTypeHistogram specify that histogram // type metrics need to be used for Duration of Pipelinerun DurationPipelinerunTypeHistogram = "histogram" // DurationPipelinerunTypeLastValue specify that lastValue or // gauge type metrics need to be used for Duration of Pipelinerun DurationPipelinerunTypeLastValue = "lastvalue" )
Variables ¶
This section is empty.
Functions ¶
func GetMetricsConfigName ¶
func GetMetricsConfigName() string
GetMetricsConfigName returns the name of the configmap containing all customizations for the storage bucket.
Types ¶
type Config ¶
type Config struct {
Metrics *Metrics
}
Config holds the collection of configurations that we attach to contexts.
func FromContext ¶
FromContext extracts a Config from the provided context.
type Metrics ¶
type Metrics struct { TaskrunLevel string PipelinerunLevel string DurationTaskrunType string DurationPipelinerunType string }
Metrics holds the configurations for the metrics
func NewMetricsFromConfigMap ¶
NewMetricsFromConfigMap returns a Config for the given configmap
type Store ¶
type Store struct {
*configmap.UntypedStore
}
Store is a typed wrapper around configmap.Untyped store to handle our configmaps.
func NewStore ¶
NewStore creates a new store of Configs and optionally calls functions when ConfigMaps are updated.
Click to show internal directories.
Click to hide internal directories.