api

package
v0.0.0-...-e12f87f Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeCommitmentsAPIMonitor

type ChangeCommitmentsAPIMonitor struct {
	// contains filtered or unexported fields
}

func NewChangeCommitmentsAPIMonitor

func NewChangeCommitmentsAPIMonitor() ChangeCommitmentsAPIMonitor

func (*ChangeCommitmentsAPIMonitor) Collect

func (m *ChangeCommitmentsAPIMonitor) Collect(ch chan<- prometheus.Metric)

func (*ChangeCommitmentsAPIMonitor) Describe

func (m *ChangeCommitmentsAPIMonitor) Describe(ch chan<- *prometheus.Desc)

type HTTPAPI

type HTTPAPI struct {
	// contains filtered or unexported fields
}

HTTPAPI implements Limes LIQUID commitment validation endpoints.

func NewAPI

func NewAPI(client client.Client) *HTTPAPI

func NewAPIWithConfig

func NewAPIWithConfig(k8sClient client.Client, config commitments.APIConfig, vmSource reservations.VMSource) *HTTPAPI

NewAPIWithConfig creates an HTTPAPI with the given config and optional usageDB client.

func (*HTTPAPI) HandleChangeCommitments

func (api *HTTPAPI) HandleChangeCommitments(w http.ResponseWriter, r *http.Request)

HandleChangeCommitments implements POST /commitments/v1/change-commitments from the Limes LIQUID API. It writes CommittedResource CRDs (one per commitment) and polls their status conditions until the controller confirms or rejects each one. On any failure the whole batch is rolled back.

See: https://github.com/sapcc/go-api-declarations/blob/main/liquid/commitment.go See: https://pkg.go.dev/github.com/sapcc/go-api-declarations/liquid

func (*HTTPAPI) HandleQuota

func (api *HTTPAPI) HandleQuota(w http.ResponseWriter, r *http.Request)

HandleQuota implements PUT /commitments/v1/projects/:project_id/quota from Limes LIQUID API. See: https://pkg.go.dev/github.com/sapcc/go-api-declarations/liquid

This endpoint receives quota requests from Limes and persists them as ProjectQuota CRDs. One CRD per project per availability zone, named "quota-<project-uuid>-<az>".

func (*HTTPAPI) HandleReportCapacity

func (api *HTTPAPI) HandleReportCapacity(w http.ResponseWriter, r *http.Request)

See: https://github.com/sapcc/go-api-declarations/blob/main/liquid/commitment.go See: https://pkg.go.dev/github.com/sapcc/go-api-declarations/liquid Reports available capacity across all flavor group resources. Note, unit is specified in the Info API response with multiple of the smallest memory resource unit within a flavor group.

func (*HTTPAPI) HandleReportUsage

func (api *HTTPAPI) HandleReportUsage(w http.ResponseWriter, r *http.Request)

HandleReportUsage implements POST /commitments/v1/projects/:project_id/report-usage from Limes LIQUID API. See: https://github.com/sapcc/go-api-declarations/blob/main/liquid/report_usage.go See: https://pkg.go.dev/github.com/sapcc/go-api-declarations/liquid

This endpoint reports usage information for a specific project's committed resources, including per-AZ usage, physical usage, and detailed VM subresources.

func (*HTTPAPI) Init

func (api *HTTPAPI) Init(mux *http.ServeMux, registry prometheus.Registerer, log logr.Logger)

type InfoAPIMonitor

type InfoAPIMonitor struct {
	// contains filtered or unexported fields
}

func NewInfoAPIMonitor

func NewInfoAPIMonitor() InfoAPIMonitor

func (*InfoAPIMonitor) Collect

func (m *InfoAPIMonitor) Collect(ch chan<- prometheus.Metric)

func (*InfoAPIMonitor) Describe

func (m *InfoAPIMonitor) Describe(ch chan<- *prometheus.Desc)

type QuotaAPIMonitor

type QuotaAPIMonitor struct {
	// contains filtered or unexported fields
}

func NewQuotaAPIMonitor

func NewQuotaAPIMonitor() QuotaAPIMonitor

func (*QuotaAPIMonitor) Collect

func (m *QuotaAPIMonitor) Collect(ch chan<- prometheus.Metric)

func (*QuotaAPIMonitor) Describe

func (m *QuotaAPIMonitor) Describe(ch chan<- *prometheus.Desc)

type ReportCapacityAPIMonitor

type ReportCapacityAPIMonitor struct {
	// contains filtered or unexported fields
}

func NewReportCapacityAPIMonitor

func NewReportCapacityAPIMonitor() ReportCapacityAPIMonitor

func (*ReportCapacityAPIMonitor) Collect

func (m *ReportCapacityAPIMonitor) Collect(ch chan<- prometheus.Metric)

func (*ReportCapacityAPIMonitor) Describe

func (m *ReportCapacityAPIMonitor) Describe(ch chan<- *prometheus.Desc)

type ReportUsageAPIMonitor

type ReportUsageAPIMonitor struct {
	// contains filtered or unexported fields
}

func NewReportUsageAPIMonitor

func NewReportUsageAPIMonitor() ReportUsageAPIMonitor

func (*ReportUsageAPIMonitor) Collect

func (m *ReportUsageAPIMonitor) Collect(ch chan<- prometheus.Metric)

func (*ReportUsageAPIMonitor) Describe

func (m *ReportUsageAPIMonitor) Describe(ch chan<- *prometheus.Desc)

Jump to

Keyboard shortcuts

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