slo

package
v1.34.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	BreachRule          = "BREACH"
	ErrorBudgetLeftRule = "ERROR_BUDGET_LEFT"
	BurnRateRule        = "BURN_RATE"
)
View Source
const (
	RequestBased = "RequestBased"
	WindowsBased = "WindowsBased"
)
View Source
const (
	RollingWindowTarget  = "RollingWindow"
	CalendarWindowTarget = "CalendarWindow"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseSlo

type BaseSlo struct {
	Creator       string      `json:"creator,omitempty"`
	LastUpdatedBy string      `json:"lastUpdatedBy,omitempty"`
	Created       int64       `json:"created,omitempty"`
	LastUpdated   int64       `json:"lastUpdated,omitempty"`
	Id            string      `json:"id,omitempty"`
	Name          string      `json:"name,omitempty"`
	Description   string      `json:"description,omitempty"`
	Targets       []SloTarget `json:"targets,omitempty"`
	Type          string      `json:"type,omitempty"`
	Metadata      []string    `json:"metadata,omitempty"`
}

type BaseSloAlertRule

type BaseSloAlertRule struct {
	Type string `json:"type,omitempty"`
}

type BaseSloTarget

type BaseSloTarget struct {
	Slo           float64        `json:"slo,omitempty"`
	SloAlertRules []SloAlertRule `json:"sloAlertRules,omitempty"`
	Type          string         `json:"type,omitempty"`
}

type BreachDetectorParameters

type BreachDetectorParameters struct {
	FireLasting      string  `json:"fireLasting,omitempty"`
	PercentOfLasting float64 `json:"percentOfLasting,omitempty"`
}

type BreachDetectorRule

type BreachDetectorRule struct {
	detector.Rule
	Parameters *BreachDetectorParameters `json:"parameters,omitempty"`
}

type BreachSloAlertRule

type BreachSloAlertRule struct {
	Rules []*BreachDetectorRule `json:"rules,omitempty"`
}

type BurnRateDetectorParameters

type BurnRateDetectorParameters struct {
	ShortWindow1       string  `json:"shortWindow1,omitempty"`
	LongWindow1        string  `json:"longWindow1,omitempty"`
	ShortWindow2       string  `json:"shortWindow2,omitempty"`
	LongWindow2        string  `json:"longWindow2,omitempty"`
	BurnRateThreshold1 float64 `json:"burnRateThreshold1,omitempty"`
	BurnRateThreshold2 float64 `json:"burnRateThreshold2,omitempty"`
}

type BurnRateDetectorRule

type BurnRateDetectorRule struct {
	detector.Rule
	Parameters *BurnRateDetectorParameters `json:"parameters,omitempty"`
}

type BurnRateSloAlertRule

type BurnRateSloAlertRule struct {
	Rules []*BurnRateDetectorRule `json:"rules,omitempty"`
}

type CalendarWindowSloTarget

type CalendarWindowSloTarget struct {
	CycleType  string `json:"cycleType,omitempty"`
	CycleStart string `json:"cycleStart,omitempty"`
}

type ErrorBudgetLeftDetectorParameters

type ErrorBudgetLeftDetectorParameters struct {
	FireLasting            string  `json:"fireLasting,omitempty"`
	PercentOfLasting       float64 `json:"percentOfLasting,omitempty"`
	PercentErrorBudgetLeft float64 `json:"percentErrorBudgetLeft,omitempty"`
}

type ErrorBudgetLeftDetectorRule

type ErrorBudgetLeftDetectorRule struct {
	detector.Rule
	Parameters *ErrorBudgetLeftDetectorParameters `json:"parameters,omitempty"`
}

type ErrorBudgetLeftSloAlertRule

type ErrorBudgetLeftSloAlertRule struct {
	Rules []*ErrorBudgetLeftDetectorRule `json:"rules,omitempty"`
}

type RequestBasedSlo

type RequestBasedSlo struct {
	Inputs *RequestBasedSloInput `json:"inputs,omitempty"`
}

type RequestBasedSloInput

type RequestBasedSloInput struct {
	ProgramText      string `json:"programText,omitempty"`
	GoodEventsLabel  string `json:"goodEventsLabel,omitempty"`
	TotalEventsLabel string `json:"totalEventsLabel,omitempty"`
}

type RollingWindowSloTarget

type RollingWindowSloTarget struct {
	CompliancePeriod string `json:"compliancePeriod,omitempty"`
}

type SloAlertRule

func (*SloAlertRule) MarshalJSON

func (rule *SloAlertRule) MarshalJSON() ([]byte, error)

func (*SloAlertRule) UnmarshalJSON

func (rule *SloAlertRule) UnmarshalJSON(data []byte) error

type SloObject

type SloObject struct {
	BaseSlo
	*RequestBasedSlo
	*WindowBasedSlo
}

func (SloObject) MarshalJSON

func (slo SloObject) MarshalJSON() ([]byte, error)

func (*SloObject) UnmarshalJSON

func (slo *SloObject) UnmarshalJSON(data []byte) error

type SloTarget

func (*SloTarget) MarshalJSON

func (target *SloTarget) MarshalJSON() ([]byte, error)

func (*SloTarget) UnmarshalJSON

func (target *SloTarget) UnmarshalJSON(data []byte) error

type WindowBasedSlo

type WindowBasedSlo struct {
	Inputs *WindowBasedSloInput `json:"inputs,omitempty"`
}

type WindowBasedSloInput

type WindowBasedSloInput struct {
	ProgramText string `json:"programText,omitempty"`
}

Jump to

Keyboard shortcuts

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