v2

package
v0.89.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package v2 provides the API for managing SLO status API V2 requests in the SDK.

Index

Constants

View Source
const (
	QueryKeyLimit  = "limit"
	QueryKeyCursor = "cursor"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BurnRateCondition

type BurnRateCondition struct {
	Value    float64 `json:"value"`
	Operator string  `json:"op"`
}

type Composite

type Composite struct {
	Target            *float64           `json:"target,omitempty"`
	BurnRateCondition *BurnRateCondition `json:"burnRateCondition,omitempty"`
	CompositeObjective
}

type CompositeObjective

type CompositeObjective struct {
	BurnRate                       *float64 `json:"burnRate,omitempty"`
	ErrorBudgetRemaining           *float64 `json:"errorBudgetRemaining,omitempty"`
	ErrorBudgetRemainingPercentage *float64 `json:"errorBudgetRemainingPercentage,omitempty"`
	Reliability                    *float64 `json:"reliability,omitempty"`
}

type Counts

type Counts struct {
	Good  *float64 `json:"good,omitempty"`
	Total *float64 `json:"total,omitempty"`
}

type Endpoints

type Endpoints interface {
	GetSLO(ctx context.Context, project, name string) (slo SLODetails, err error)
	GetSLOs(ctx context.Context, params GetSLOsRequest) (slos SLOListResponse, err error)
}

func NewEndpoints

func NewEndpoints(client endpointsHelpers.Client) Endpoints

type GetSLOsRequest

type GetSLOsRequest struct {
	Limit  int
	Cursor string
}
type Links struct {
	Self   string `json:"self"`
	Next   string `json:"next"`
	Cursor string `json:"cursor"`
}

type Objective

type Objective struct {
	Name                           string   `json:"name"`
	DisplayName                    string   `json:"displayName"`
	Target                         float64  `json:"target"`
	BurnRate                       *float64 `json:"burnRate,omitempty"`
	ErrorBudgetRemaining           *float64 `json:"errorBudgetRemaining,omitempty"`
	ErrorBudgetRemainingPercentage *float64 `json:"errorBudgetRemainingPercentage,omitempty"`
	Reliability                    *float64 `json:"reliability,omitempty"`
	Counts                         *Counts  `json:"counts,omitempty"`
	SLIType                        string   `json:"sliType"`
}

type Project

type Project struct {
	Name        string              `json:"name"`
	DisplayName string              `json:"displayName"`
	Labels      map[string][]string `json:"labels,omitempty"`
}

type SLODetails

type SLODetails struct {
	Name            string              `json:"name"`
	DisplayName     string              `json:"displayName"`
	Description     string              `json:"description"`
	Project         Project             `json:"project"`
	Service         Service             `json:"service"`
	CreatedAt       string              `json:"createdAt"`
	Objectives      []Objective         `json:"objectives"`
	Composite       *Composite          `json:"composite,omitempty"`
	Labels          map[string][]string `json:"labels,omitempty"`
	Annotations     map[string]string   `json:"annotations,omitempty"`
	BudgetingMethod string              `json:"budgetingMethod"`
}

type SLOListResponse

type SLOListResponse struct {
	Data  []SLODetails `json:"data"`
	Links Links        `json:"links"`
}

type Service

type Service struct {
	Name        string              `json:"name"`
	DisplayName string              `json:"displayName"`
	Labels      map[string][]string `json:"labels,omitempty"`
}

Jump to

Keyboard shortcuts

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