Documentation ¶
Index ¶
- Constants
- func ComsumedRemainingBudget(delta float64, errBudget float64) (float64, float64)
- func DowntimePerPeriod(percent float64, period time.Duration) time.Duration
- func EditReportSlice(s []*Report) *[]Report
- func ErrorBudgetAsPercentage(slo float64) float64
- func GetSLOTrend(svcName string, sloName string, reports []Report) []bool
- func IDFromMetadata(org string, metadata entities.Metadata, apiVersion string) string
- func IsDeprecatedManifest(path string) bool
- func ParseSelectors(s string) (map[string]string, error)
- func Write(format Format, r *Report, w io.Writer, templateFile string, l *log.Logger, ...)
- type Format
- type Report
- type ReportOptions
- type ReportOutput
- type Service
- type ServiceLevel
- type ServiceLevelResult
- type Window
Constants ¶
View Source
const SLOTemplate = `` /* 2900-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 EditReportSlice ¶ added in v0.20.2
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
func IDFromMetadata ¶ added in v0.20.2
func IsDeprecatedManifest ¶ added in v0.20.2
Types ¶
type Report ¶
type Report struct { APIVersion string `json:"-" yaml:"-"` Timestamp time.Time `json:"timestamp" yaml:"timestamp"` Services []*Service `json:"services" yaml:"services"` }
func GetReports ¶ added in v0.20.2
func GetReports(opts *ReportOptions) ([]*Report, error)
func MapToReports ¶ added in v0.20.2
func (*Report) GetResult ¶ added in v0.15.0
func (r *Report) GetResult(svcName string, sloName string) *ServiceLevelResult
GetResult returns the result for a given service & slo name
func (*Report) HasObjResults ¶ added in v0.25.0
type ReportOptions ¶ added in v0.20.2
type ReportOutput ¶ added in v0.20.2
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"` }
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.