model

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SLOGroupLabelsIDMarshal

func SLOGroupLabelsIDMarshal(sloID string, labels map[string]string) string

func SLOGroupLabelsIDUnmarshal

func SLOGroupLabelsIDUnmarshal(id string) (sloID string, labels map[string]string, err error)

Types

type Alert

type Alert struct {
	Name string
}

type DataPoint

type DataPoint struct {
	Value   float64
	Missing bool // Easier than using float64 nil pointers.
	TS      time.Time
}

type SLO

type SLO struct {
	ID             string // ID is unique for an SLO and grouped SLOs.
	SlothID        string // SlothID is the ID set by Sloth on Prometheus (if grouped by labels SLO they will share this ID).
	Name           string
	ServiceID      string
	Objective      float64
	GroupLabels    map[string]string // Some SLOs are grouped by labels under the umbrella of the same SLO spec.
	IsGrouped      bool
	PeriodDuration time.Duration
}

type SLOAlerts

type SLOAlerts struct {
	SLOID         string
	FiringPage    *Alert
	FiringWarning *Alert
}

type SLOBudgetDetails

type SLOBudgetDetails struct {
	SLOID                     string
	BurningBudgetPercent      float64 // Percentage of error budget burning.
	BurnedBudgetWindowPercent float64 // Percentage of error budget burned in the period window.
}

type Service

type Service struct {
	ID string
}

type ServiceStats

type ServiceStats struct {
	ServiceID                         string
	TotalSLOs                         int
	SLOsCurrentlyBurningOverBudget    int
	SLOsAlreadyConsumedBudgetOnPeriod int
}

Jump to

Keyboard shortcuts

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