Documentation
¶
Index ¶
- Constants
- func ComsumedRemainingBudget(delta float64, errBudget float64) (float64, float64)
- func DowntimePerPeriod(percent float64, period time.Duration) time.Duration
- func ErrorBudgetAsPercentage(slo float64) float64
- func GetSLOTrend(svcName string, sloName string, reports []Report) []bool
- func Write(format Format, r *Report, w io.Writer, templateFile string, l *log.Logger, ...)
- type Format
- type Report
- type Service
- type ServiceLevel
- type ServiceLevelResult
- type Window
Constants ¶
View Source
const SLOTemplate = `` /* 2802-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func ComsumedRemainingBudget ¶ added in v0.15.0
ComsumedRemainingBudget computes the consumed & remaining error budget percentages
func DowntimePerPeriod ¶ added in v0.15.0
DowntimePerPeriod computes the duration of allowed downtime for a given SLO percentage over a time period
func ErrorBudgetAsPercentage ¶ added in v0.15.0
ErrorBudgetAsPercentage returns the error budget for a SLO as percentage
func GetSLOTrend ¶ added in v0.15.0
SLOTrend returns the trend for a given SLO is all reports for each report, we need to iterate over any service/slo as indexes might evolve over time, from one report to another It returns a slice of boolean values when SLO is met or not for each report When no result is available from a given report, no trend is appended
Types ¶
type Report ¶
type Service ¶ added in v0.11.0
type Service struct { Dependencies []string `json:"-" yaml:"-"` ServiceLevels []*ServiceLevel `json:"service_levels" yaml:"service_levels"` Name string `json:"name" yaml:"name"` }
type ServiceLevel ¶
type ServiceLevel struct { Name string `json:"name" yaml:"name"` Type string `json:"type" yaml:"type"` Objective float64 `json:"objective" yaml:"objective"` Period core.Iso8601Duration `yaml:"period,omitempty" json:"period,omitempty"` Result *ServiceLevelResult `json:"result" yaml:"result"` // TODO: decide whether this should be implemented as // Observation Windor or Boundary ObservationWindow Window `json:"window" yaml:"window"` // contains filtered or unexported fields }
type ServiceLevelResult ¶ added in v0.11.0
type ServiceLevelResult struct { Actual interface{} `json:"actual"` Delta interface{} `json:"delta"` // used to record whether the SLO is met or not SloIsMet bool `json:"slo_is_met"` }
Click to show internal directories.
Click to hide internal directories.