hcp

package
v0.0.0-...-7fef8c4 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterServiceError

func ClusterServiceError(err error, what string) error

ClusterServiceError checks if err is an OCM not-found error and returns a specific CloudError. This prevents ReportError from misinterpreting it as "HCP resource not found" (the HCP was already found in the database). Non-OCM errors are wrapped for ReportError to handle as internal errors.

Types

type BackupExecutionState

type BackupExecutionState string
const (
	BackupExecutionStateActive BackupExecutionState = "Active"
	BackupExecutionStatePaused BackupExecutionState = "Paused"
)

type BackupScheduleDetail

type BackupScheduleDetail struct {
	Name           string `json:"name"`
	LastBackupTime string `json:"lastBackupTime,omitempty"`
	// Phase maps to Velero schedule.state.phase. Possible values "New", "Enabled", "FailedValidation"
	Phase string `json:"phase,omitempty"`
	// BackupExecutionState maps to Velero schedule.spec.pause. Possible values: "Active"(paused=false) and "Paused"(paused=true)
	BackupExecutionState BackupExecutionState `json:"backupExecutionState,omitempty"`
}

BackupScheduleDetail holds per-schedule status from the Velero Schedule ReadDesire.

type BackupSchedulePatchRequest

type BackupSchedulePatchRequest struct {
	State coreapi.BackupScheduleState `json:"state"`
}

BackupSchedulePatchRequest is the JSON body for PATCH backup schedule requests.

type BackupSchedulePatchResponse

type BackupSchedulePatchResponse struct {
	State coreapi.BackupScheduleState `json:"state"`
}

BackupSchedulePatchResponse is the JSON response for PATCH backup schedule requests.

type BackupScheduleResponse

type BackupScheduleResponse struct {
	State     coreapi.BackupScheduleState `json:"state"`
	Schedules []BackupScheduleDetail      `json:"schedules"`
}

BackupScheduleResponse is the JSON response for backup schedule endpoints.

type HCPDemoListLoadbalancersHandler

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

func (*HCPDemoListLoadbalancersHandler) ServeHTTP

func (h *HCPDemoListLoadbalancersHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request) error

type HCPDesiredControlPlaneSizeHandler

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

HCPDesiredControlPlaneSizeHandler sets ServiceProviderClusterSpec DesiredHostedClusterControlPlaneSize on the per-cluster ServiceProviderCluster. It intentionally writes only that one field — every other Spec/Status value is left as-is — so SRE callers can adjust the sizing tier without touching anything else on the document.

func NewHCPDesiredControlPlaneSizeHandler

func NewHCPDesiredControlPlaneSizeHandler(resourcesDBClient corecosmosstorage.ResourcesDBClient) *HCPDesiredControlPlaneSizeHandler

func (*HCPDesiredControlPlaneSizeHandler) ServeHTTP

func (h *HCPDesiredControlPlaneSizeHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request) error

type HCPGetBackupScheduleHandler

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

HCPGetBackupScheduleHandler handles GET requests for backup schedule.

func NewHCPGetBackupScheduleHandler

func NewHCPGetBackupScheduleHandler(resourcesDBClient corecosmosstorage.ResourcesDBClient, kubeApplierDBClients kubeappliercosmosstorage.KubeApplierDBClients) *HCPGetBackupScheduleHandler

NewHCPGetBackupScheduleHandler creates a new backup schedule GET handler.

func (*HCPGetBackupScheduleHandler) ServeHTTP

func (h *HCPGetBackupScheduleHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request) error

type HCPHelloWorldHandler

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

func NewHCPHelloWorldHandler

func NewHCPHelloWorldHandler(resourcesDBClient corecosmosstorage.ResourcesDBClient, csClient ocm.ClusterServiceClientSpec) *HCPHelloWorldHandler

func (*HCPHelloWorldHandler) ServeHTTP

func (h *HCPHelloWorldHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request) error

type HCPPatchBackupScheduleHandler

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

HCPPatchBackupScheduleHandler handles PATCH requests to update backup schedule state.

func NewHCPPatchBackupScheduleHandler

func NewHCPPatchBackupScheduleHandler(resourcesDBClient corecosmosstorage.ResourcesDBClient) *HCPPatchBackupScheduleHandler

NewHCPPatchBackupScheduleHandler creates a new backup schedule PATCH handler.

func (*HCPPatchBackupScheduleHandler) ServeHTTP

func (h *HCPPatchBackupScheduleHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request) error

type HCPSerialConsoleHandler

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

HCPSerialConsoleHandler handles requests to retrieve VM serial console logs for debugging purposes. This endpoint allows SREs to access boot diagnostics and console output from VMs in the HCP cluster's managed resource group.

func NewHCPSerialConsoleHandler

func NewHCPSerialConsoleHandler(
	resourcesDBClient corecosmosstorage.ResourcesDBClient,
	fpaCredentialRetriever fpa.FirstPartyApplicationTokenCredentialRetriever,
) *HCPSerialConsoleHandler

NewHCPSerialConsoleHandler creates a new serial console handler with the required dependencies

func (*HCPSerialConsoleHandler) ServeHTTP

func (h *HCPSerialConsoleHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request) error

ServeHTTP handles GET requests to retrieve serial console output for a specified VM.

Directories

Path Synopsis
Package breakglass provides HTTP handlers for breakglass session management.
Package breakglass provides HTTP handlers for breakglass session management.

Jump to

Keyboard shortcuts

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