Documentation ¶
Index ¶
- Variables
- func ApplyPatches(patches []Patch, documentBytes []byte) ([]byte, error)
- func MatchDocument(criteria Match, documentBytes []byte) bool
- func OverrideMetadata(overrideMetadata map[string]string) func(options *readOptions)
- func ParseMetadata(input string) map[string]string
- func SkipMetadataInterpolation(options *readOptions)
- func ValidateForK8s(document Document) []error
- func ValidateForRegistry(document Document) []error
- func ValidateIndicator(i Indicator, idx int) []error
- 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}
Functions ¶
func MatchDocument ¶
func OverrideMetadata ¶
func ParseMetadata ¶
func SkipMetadataInterpolation ¶
func SkipMetadataInterpolation(options *readOptions)
func ValidateForK8s ¶ added in v0.7.11
func ValidateForRegistry ¶ added in v0.7.11
func ValidateIndicator ¶ added in v0.7.11
Types ¶
type Document ¶
type Document struct { APIVersion string Product Product Metadata map[string]string Indicators []Indicator Layout Layout }
func ProcessDocument ¶
func ReadIndicatorDocument ¶
func (Document) GetIndicator ¶ added in v0.7.11
type Indicator ¶
type Indicator struct { Name string PromQL string Thresholds []Threshold Alert Alert ServiceLevel *ServiceLevel Documentation map[string]string Presentation Presentation }
type OperatorType ¶
type OperatorType int
const ( LessThan OperatorType = iota LessThanOrEqualTo EqualTo NotEqualTo GreaterThanOrEqualTo GreaterThan Undefined )
func GetComparatorFromString ¶
func GetComparatorFromString(operator string) OperatorType
type Patch ¶
type Patch struct { APIVersion string Match Match Operations []patch.OpDefinition }
func ReadPatchBytes ¶
func ReadPatchFile ¶
type Presentation ¶
type ServiceLevel ¶ added in v0.7.11
type ServiceLevel struct {
Objective float64
}
type Threshold ¶
type Threshold struct { Level string Operator OperatorType Value float64 }
func (*Threshold) GetComparator ¶
func (*Threshold) GetComparatorAbbrev ¶
Click to show internal directories.
Click to hide internal directories.