converter

package
v0.0.0-...-e048679 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const K8sResourceNameRegexp = "^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$"
View Source
const MaxInt = math.MaxInt
View Source
const MaxResourceNameLength = 253
View Source
const MinInt = -MaxInt - 1

Variables

This section is empty.

Functions

func ConvertResourceName

func ConvertResourceName(name string) string

func NewEmptyOperatorErr

func NewEmptyOperatorErr(op []string) error

func NewInconvertibleOperatorCombinationErr

func NewInconvertibleOperatorCombinationErr(op1, op2 string) error

func NewInconvertibleValueErr

func NewInconvertibleValueErr(msg string) error

func NewInvalidOperatorErr

func NewInvalidOperatorErr(msg string) error

func NewUnsupportedIntervalCombinationErr

func NewUnsupportedIntervalCombinationErr(op []string) error

func NewUnsupportedResourceNameErr

func NewUnsupportedResourceNameErr(name string) error

func ValidateResourceName

func ValidateResourceName(name string) error

Types

type Criteria

type Criteria struct {
	Operators []string `yaml:"criteria,omitempty" json:"criteria,omitempty"`
}

type Interval

type Interval struct {
	Start *inf.Dec
	End   *inf.Dec
}

type Objective

type Objective struct {
	Name    string     `yaml:"sli" json:"sli"`
	KeySLI  bool       `yaml:"key_sli,omitempty" json:"key_sli,omitempty"`
	Weight  int        `yaml:"weight,omitempty" json:"weight,omitempty"`
	Warning []Criteria `yaml:"warning,omitempty" json:"warning,omitempty"`
	Pass    []Criteria `yaml:"pass,omitempty" json:"pass,omitempty"`
}

type Operator

type Operator struct {
	Value     *inf.Dec
	Operation string
}

type SLI

type SLI struct {
	Indicators map[string]string `yaml:"indicators"`
}

type SLIConverter

type SLIConverter struct {
}

func NewSLIConverter

func NewSLIConverter() *SLIConverter

func (*SLIConverter) Convert

func (c *SLIConverter) Convert(fileContent []byte, provider string, namespace string) (string, error)

type SLO

type SLO struct {
	Objectives []*Objective `yaml:"objectives" json:"objectives"`
	TotalScore Score        `yaml:"total_score" json:"total_score"`
}

type SLOConverter

type SLOConverter struct {
}

func NewSLOConverter

func NewSLOConverter() *SLOConverter

func (*SLOConverter) Convert

func (c *SLOConverter) Convert(fileContent []byte, analysisDef string, namespace string) (string, error)

type Score

type Score struct {
	Pass    string `yaml:"pass" json:"pass"`
	Warning string `yaml:"warning" json:"warning"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL