Documentation
¶
Index ¶
- Variables
- func ApplyPatches(patches []Patch, documentBytes []byte) ([]byte, error)
- func MatchDocument(criteria Match, documentBytes []byte) bool
- func MetadataFromYAML(reader io.ReadCloser) (map[string]string, error)
- func OverrideMetadata(overrideMetadata map[string]string) func(options *readOptions)
- func ParseMetadata(input string) map[string]string
- func SkipMetadataInterpolation(options *readOptions)
- type Alert
- type ChartType
- type Document
- type Indicator
- type Layout
- type Match
- type OperatorType
- type Patch
- type Presentation
- type Product
- type ReadOpt
- type Section
- type ServiceLevel
- type Threshold
Constants ¶
This section is empty.
Variables ¶
View Source
var ChartTypes = []ChartType{StepChart, BarChart, StatusChart, QuotaChart}
Functions ¶
func MatchDocument ¶
func MetadataFromYAML ¶ added in v0.7.15
func MetadataFromYAML(reader io.ReadCloser) (map[string]string, error)
func OverrideMetadata ¶
func ParseMetadata ¶
func SkipMetadataInterpolation ¶
func SkipMetadataInterpolation(options *readOptions)
Types ¶
type Document ¶
type Document struct {
APIVersion string `yaml:"apiVersion"`
Product Product `yaml:"product"`
Metadata map[string]string `yaml:"metadata"`
Indicators []Indicator `yaml:"indicators"`
Layout Layout `yaml:"layout"`
}
func DocumentFromYAML ¶ added in v0.7.15
func DocumentFromYAML(reader io.ReadCloser) (Document, error)
func ProcessDocument ¶
func (Document) GetIndicator ¶ added in v0.7.11
func (*Document) Interpolate ¶ added in v0.8.1
func (document *Document) Interpolate()
func (*Document) OverrideMetadata ¶ added in v0.8.1
type Indicator ¶
type Indicator struct {
Name string `yaml:"name"`
PromQL string `yaml:"promql"`
Thresholds []Threshold `yaml:"thresholds,omitempty"`
Alert Alert `yaml:"alert"`
ServiceLevel *ServiceLevel `yaml:"serviceLevel"`
Documentation map[string]string `yaml:"documentation,omitempty"`
Presentation Presentation `yaml:"presentation"`
}
type OperatorType ¶
type OperatorType int
const ( Undefined OperatorType = iota LessThan LessThanOrEqualTo EqualTo NotEqualTo GreaterThanOrEqualTo GreaterThan )
func GetComparatorFromString ¶
func GetComparatorFromString(operator string) OperatorType
type Patch ¶
type Patch struct {
APIVersion string
Match Match
Operations []patch.OpDefinition
}
func PatchFromYAML ¶ added in v0.7.15
func PatchFromYAML(reader io.ReadCloser) (Patch, error)
func ReadPatchFile ¶
type Presentation ¶
type Product ¶
func ProductFromYAML ¶ added in v0.7.15
func ProductFromYAML(reader io.ReadCloser) (Product, error)
type ServiceLevel ¶ added in v0.7.11
type ServiceLevel struct {
Objective float64 `yaml:"objective"`
}
type Threshold ¶
type Threshold struct {
Level string `yaml:"level"`
Operator OperatorType `yaml:"operator"`
Value float64 `yaml:"value"`
}
func (*Threshold) GetComparator ¶
func (*Threshold) GetComparatorAbbrev ¶
func (*Threshold) UnmarshalYAML ¶ added in v0.8.1
Click to show internal directories.
Click to hide internal directories.