command

package
v1.1.68-test Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 9 Imported by: 1 module, 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

View Source
var TerminalStages = []string{"failed", "completed", "cancelled"}

TerminalStages are the lifecycle stages a command never leaves (command.ts TerminalCommandStages). Defined once: a hand-written copy that omitted "cancelled" wedged volume-set deletion on both sides.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	ClusterId string `json:"clusterId,omitzero"`
	Since     string `json:"since,omitzero" validate:"date"`
}

type Clusters

type Clusters map[string]Cluster

type Command

type Command struct {
	Id             string                `json:"id,omitzero" validate:"uuid"`
	OwnerId        string                `json:"ownerId,omitzero" validate:"uuid"`
	Kind           base.Kind             `json:"kind,omitzero"`
	Version        *float64              `json:"version,omitzero" validate:"positive,integer"`
	Created        string                `json:"created,omitzero" validate:"date"`
	LastModified   string                `json:"lastModified,omitzero" validate:"date"`
	Links          base.Links            `json:"links,omitzero"`
	Tags           CommandTags           `json:"tags,omitzero" validate:"optional"`
	Type           string                `json:"type" validate:"required"`
	LifecycleStage CommandLifecycleStage `json:"lifecycleStage,omitzero" validate:"default=pending"`
	Spec           CommandSpec           `json:"spec,omitzero"`
	Status         CommandStatus         `json:"status,omitzero"`
	ConflictQuery  *query.Query          `json:"conflictQuery,omitzero" validate:"optional"`
}

func (Command) ValidationRule

func (Command) ValidationRule() *validate.Rule

ValidationRule reflects Command — the schema the "command" kind validates against. Spec/Status are generic maps (Object.unknown); conflictQuery resolves to query's own rule via the query.Query Validator.

type CommandLifecycleStage

type CommandLifecycleStage string //ts:export
const (
	CommandLifecycleStagePending               CommandLifecycleStage = "pending"
	CommandLifecycleStageRunning               CommandLifecycleStage = "running"
	CommandLifecycleStageCancellationRequested CommandLifecycleStage = "cancellation-requested"
	CommandLifecycleStageCancelled             CommandLifecycleStage = "cancelled"
	CommandLifecycleStageCompleted             CommandLifecycleStage = "completed"
	CommandLifecycleStageFailed                CommandLifecycleStage = "failed"
)

func (CommandLifecycleStage) EnumValues

func (CommandLifecycleStage) EnumValues() []string

type CommandSpec

type CommandSpec map[string]any

type CommandStatus

type CommandStatus map[string]any

type CommandTags

type CommandTags = base.Tags

CommandTags aliases base.Tags for the reflection base-type registry.

type CopyVolumeSideStatus added in v1.1.24

type CopyVolumeSideStatus struct {
	Stage                CopyVolumeSideStatusStage `json:"stage,omitzero" validate:"required"`
	Messages             []string                  `json:"messages,omitzero"`
	LockNames            []string                  `json:"lockNames,omitzero"`
	TempStorageClassName string                    `json:"tempStorageClassName,omitzero"`
	Complete             *bool                     `json:"complete,omitzero" validate:"default=false"`
	CleanedUp            *bool                     `json:"cleanedUp,omitzero" validate:"default=false"`
}

CopyVolumeSideStatus is one actuator's half of a copy; each side writes only its own.

type CopyVolumeSideStatusStage added in v1.1.24

type CopyVolumeSideStatusStage string

func (CopyVolumeSideStatusStage) EnumValues

func (CopyVolumeSideStatusStage) EnumValues() []string

type CopyVolumeSpec added in v1.1.24

type CopyVolumeSpec struct {
	Location                             string   `json:"location" validate:"required"`
	TargetLocation                       string   `json:"targetLocation" validate:"required"`
	VolumeIndex                          float64  `json:"volumeIndex" validate:"required"`
	AcknowledgeDestinationVolumeDeletion *bool    `json:"acknowledgeDestinationVolumeDeletion,omitzero" validate:"default=false"`
	TimeoutSeconds                       *float64 `json:"timeoutSeconds,omitzero" validate:"optional"`
	TargetVolumeSet                      string   `json:"targetVolumeSet,omitzero" validate:"optional"`
	TargetVolumeSetId                    string   `json:"targetVolumeSetId,omitzero" validate:"optional"`
	TargetGvc                            string   `json:"targetGvc,omitzero" validate:"optional"`
	Locations                            []string `json:"locations,omitzero" validate:"optional"`
}

CopyVolumeSpec ports command.ts CopyVolumeSpec (master 8ea018b06..770c7f6af). The Joi custom (timeoutSeconds default, the same-location check, the derived `locations`) is CopyVolumeSpec.ValidationRule.

func (CopyVolumeSpec) ValidationRule

func (CopyVolumeSpec) ValidationRule() *validate.Rule

ValidationRule ports CopyVolumeSpec's custom: timeoutSeconds defaults to 600, the two ends may only share a location when the copy goes to another volume set, and `locations` — the set the scheduler beams the command to, so both actuators run it — is always derived here, never trusted from the caller.

type CopyVolumeStatus added in v1.1.24

type CopyVolumeStatus struct {
	ClusterId                   string                `json:"clusterId,omitzero"`
	ClusterIdByLocation         map[string]string     `json:"clusterIdByLocation,omitzero"`
	Messages                    []string              `json:"messages,omitzero"`
	Source                      *CopyVolumeSideStatus `json:"source,omitzero"`
	Target                      *CopyVolumeSideStatus `json:"target,omitzero"`
	ReceiverHost                string                `json:"receiverHost,omitzero"`
	ReceiverSniService          string                `json:"receiverSniService,omitzero"`
	TargetGatewayAddress        string                `json:"targetGatewayAddress,omitzero"`
	NewStorageDeviceId          string                `json:"newStorageDeviceId,omitzero"`
	NewResourceName             string                `json:"newResourceName,omitzero"`
	NewVolumeAttributes         map[string]string     `json:"newVolumeAttributes,omitzero"`
	NewVolumeSize               *float64              `json:"newVolumeSize,omitzero"`
	DestinationDeviceIdToRemove string                `json:"destinationDeviceIdToRemove,omitzero"`
	TargetHasWorkloadPod        *bool                 `json:"targetHasWorkloadPod,omitzero"`
	SourceDeviceId              string                `json:"sourceDeviceId,omitzero"`
	SourceInUse                 *bool                 `json:"sourceInUse,omitzero"`
	BulkSyncTargetPodUid        string                `json:"bulkSyncTargetPodUid,omitzero"`
	BulkSyncAttempt             *float64              `json:"bulkSyncAttempt,omitzero"`
	BulkSyncCompletedAt         string                `json:"bulkSyncCompletedAt,omitzero" validate:"date"`
	BulkSyncProgressPercent     *float64              `json:"bulkSyncProgressPercent,omitzero"`
	BulkSyncTransferredBytes    *float64              `json:"bulkSyncTransferredBytes,omitzero"`
	BulkSyncRate                string                `json:"bulkSyncRate,omitzero"`
	BulkSyncEta                 string                `json:"bulkSyncEta,omitzero"`
}

CopyVolumeStatus ports command.ts CopyVolumeStatus. Like every command status it is not validated on write; it is typed for the consumers that read it.

type CreateVolumeSnapshotSpec

type CreateVolumeSnapshotSpec struct {
	Location               string                                 `json:"location" validate:"required"`
	VolumeIndex            float64                                `json:"volumeIndex" validate:"required"`
	SnapshotName           base.Name                              `json:"snapshotName" validate:"required"`
	SnapshotExpirationDate string                                 `json:"snapshotExpirationDate,omitzero" validate:"date"`
	SnapshotTags           []CreateVolumeSnapshotSpecSnapshotTags `json:"snapshotTags,omitzero"`
}

type CreateVolumeSnapshotSpecSnapshotTags

type CreateVolumeSnapshotSpecSnapshotTags map[string]string

type CreateVolumeSnapshotStatus

type CreateVolumeSnapshotStatus struct {
	Stage               CreateVolumeSnapshotStatusStage               `json:"stage,omitzero" validate:"required,default=create-snapshot,valid=create-snapshot|update-volume-set|cleanup-k8s|revert"`
	Messages            []string                                      `json:"messages,omitzero"`
	ClusterId           string                                        `json:"clusterId,omitzero"`
	ClusterIdByLocation CreateVolumeSnapshotStatusClusterIdByLocation `json:"clusterIdByLocation,omitzero"`
	NewSnapshotId       string                                        `json:"newSnapshotId,omitzero"`
	NewSnapshotSize     *float64                                      `json:"newSnapshotSize,omitzero"`
	CreationStartTime   string                                        `json:"creationStartTime,omitzero" validate:"date"`
}

type CreateVolumeSnapshotStatusClusterIdByLocation

type CreateVolumeSnapshotStatusClusterIdByLocation map[string]string

type CreateVolumeSnapshotStatusStage

type CreateVolumeSnapshotStatusStage string
const (
	CreateVolumeSnapshotStatusStageCreateSnapshot  CreateVolumeSnapshotStatusStage = "create-snapshot"
	CreateVolumeSnapshotStatusStageUpdateVolumeSet CreateVolumeSnapshotStatusStage = "update-volume-set"
	CreateVolumeSnapshotStatusStageCleanupK8S      CreateVolumeSnapshotStatusStage = "cleanup-k8s"
	CreateVolumeSnapshotStatusStageRevert          CreateVolumeSnapshotStatusStage = "revert"
)

type DeleteCloudDevicesStatus

type DeleteCloudDevicesStatus struct {
	ClusterId              string                                         `json:"clusterId,omitzero"`
	ClusterIdByLocation    DeleteCloudDevicesStatusClusterIdByLocation    `json:"clusterIdByLocation,omitzero"`
	Volume                 volumeSet.PersistentVolumeStatus               `json:"volume" validate:"required"`
	Stage                  DeleteCloudDevicesStatusStage                  `` /* 146-byte string literal not displayed */
	Messages               []string                                       `json:"messages,omitzero"`
	PvcRef                 *DeleteCloudDevicesStatusPvcRef                `json:"pvcRef,omitzero"`
	SnapshotDeletionStatus DeleteCloudDevicesStatusSnapshotDeletionStatus `json:"snapshotDeletionStatus" validate:"required,default={}"`
}

type DeleteCloudDevicesStatusClusterIdByLocation

type DeleteCloudDevicesStatusClusterIdByLocation map[string]string

type DeleteCloudDevicesStatusPvcRef

type DeleteCloudDevicesStatusPvcRef struct {
	Namespace string `json:"namespace" validate:"required"`
	Name      string `json:"name" validate:"required"`
}

type DeleteCloudDevicesStatusSnapshotDeletionStatus

type DeleteCloudDevicesStatusSnapshotDeletionStatus map[string]SnapshotDeletionStatus

type DeleteCloudDevicesStatusStage

type DeleteCloudDevicesStatusStage string
const (
	DeleteCloudDevicesStatusStageDeleteSnapshots        DeleteCloudDevicesStatusStage = "delete-snapshots"
	DeleteCloudDevicesStatusStageDeleteVolume           DeleteCloudDevicesStatusStage = "delete-volume"
	DeleteCloudDevicesStatusStageFinalizeVolumeDeletion DeleteCloudDevicesStatusStage = "finalize-volume-deletion"
	DeleteCloudDevicesStatusStageUpdateVolumeSet        DeleteCloudDevicesStatusStage = "update-volume-set"
)

type DeleteOrphanedVolumeSnapshotSpec

type DeleteOrphanedVolumeSnapshotSpec struct {
	Location    string  `json:"location" validate:"required"`
	SnapshotId  string  `json:"snapshotId" validate:"required"`
	VolumeIndex float64 `json:"volumeIndex" validate:"required"`
}

type DeleteOrphanedVolumeSnapshotStatus

type DeleteOrphanedVolumeSnapshotStatus struct {
	Stage               DeleteOrphanedVolumeSnapshotStatusStage               `json:"stage,omitzero" validate:"required,default=delete-snapshot,valid=delete-snapshot|update-volume-set|fail"`
	ClusterId           string                                                `json:"clusterId,omitzero"`
	ClusterIdByLocation DeleteOrphanedVolumeSnapshotStatusClusterIdByLocation `json:"clusterIdByLocation,omitzero"`
	Messages            []string                                              `json:"messages,omitzero"`
}

type DeleteOrphanedVolumeSnapshotStatusClusterIdByLocation

type DeleteOrphanedVolumeSnapshotStatusClusterIdByLocation map[string]string

type DeleteOrphanedVolumeSnapshotStatusStage

type DeleteOrphanedVolumeSnapshotStatusStage string
const (
	DeleteOrphanedVolumeSnapshotStatusStageDeleteSnapshot        DeleteOrphanedVolumeSnapshotStatusStage = "delete-snapshot"
	DeleteOrphanedVolumeSnapshotStatusStageAwaitSnapshotDeletion DeleteOrphanedVolumeSnapshotStatusStage = "await-snapshot-deletion"
	DeleteOrphanedVolumeSnapshotStatusStageUpdateVolumeSet       DeleteOrphanedVolumeSnapshotStatusStage = "update-volume-set"
	DeleteOrphanedVolumeSnapshotStatusStageFail                  DeleteOrphanedVolumeSnapshotStatusStage = "fail"
)

type DeleteOrphanedVolumeSpec

type DeleteOrphanedVolumeSpec struct {
	Location                     string  `json:"location" validate:"required"`
	StorageDeviceId              string  `json:"storageDeviceId" validate:"required"`
	VolumeIndex                  float64 `json:"volumeIndex" validate:"required"`
	NewlyObservedStorageDeviceId string  `json:"newlyObservedStorageDeviceId,omitzero"`
}

type DeleteOrphanedVolumeStatus

type DeleteOrphanedVolumeStatus struct {
	Stage               DeleteOrphanedVolumeStatusStage               `` /* 140-byte string literal not displayed */
	ClusterId           string                                        `json:"clusterId,omitzero"`
	ClusterIdByLocation DeleteOrphanedVolumeStatusClusterIdByLocation `json:"clusterIdByLocation,omitzero"`
	Messages            []string                                      `json:"messages,omitzero"`
}

type DeleteOrphanedVolumeStatusClusterIdByLocation

type DeleteOrphanedVolumeStatusClusterIdByLocation map[string]string

type DeleteOrphanedVolumeStatusStage

type DeleteOrphanedVolumeStatusStage string
const (
	DeleteOrphanedVolumeStatusStageDeleteStorageResources DeleteOrphanedVolumeStatusStage = "delete-storage-resources"
	DeleteOrphanedVolumeStatusStageCleanupK8S             DeleteOrphanedVolumeStatusStage = "cleanup-k8s"
	DeleteOrphanedVolumeStatusStageUpdateVolumeSet        DeleteOrphanedVolumeStatusStage = "update-volume-set"
	DeleteOrphanedVolumeStatusStageFail                   DeleteOrphanedVolumeStatusStage = "fail"
)

type DeleteVolumeSetLocationStatus

type DeleteVolumeSetLocationStatus struct {
	Stage   DeleteVolumeSetLocationStatusStage   `` /* 137-byte string literal not displayed */
	Volumes DeleteVolumeSetLocationStatusVolumes `json:"volumes,omitzero"`
}

type DeleteVolumeSetLocationStatusStage

type DeleteVolumeSetLocationStatusStage string
const (
	DeleteVolumeSetLocationStatusStageDeleteVolumes         DeleteVolumeSetLocationStatusStage = "delete-volumes"
	DeleteVolumeSetLocationStatusStageDeleteOrphanedVolumes DeleteVolumeSetLocationStatusStage = "delete-orphaned-volumes"
	DeleteVolumeSetLocationStatusStageCleanupFilesystem     DeleteVolumeSetLocationStatusStage = "cleanup-filesystem"
	DeleteVolumeSetLocationStatusStageComplete              DeleteVolumeSetLocationStatusStage = "complete"
)

type DeleteVolumeSetLocationStatusVolumes

type DeleteVolumeSetLocationStatusVolumes map[string]DeleteCloudDevicesStatus

DeleteVolumeSetLocationStatusVolumes = pattern(Number, DeleteCloudDevicesStatus) — the NUMBER key rule is a RegisterType (reflection hardcodes map keys to String).

func (DeleteVolumeSetLocationStatusVolumes) ValidationRule

ValidationRule = pattern(Number, DeleteCloudDevicesStatus) — the Number key rule (reflection hardcodes map keys to String, so the map type carries the rule).

type DeleteVolumeSetSpec

type DeleteVolumeSetSpec struct {
	VolumeSet volumeSet.VolumeSet `json:"volumeSet" validate:"required"`
	// command.ts:405 `Joi.array().items(Joi.string().required())`. The rule is built in
	// validate.go: the engine now has Joi's required-item semantics, so this reports
	// array.includesRequiredUnknowns rather than array.min's different message.
	Locations []string `json:"locations,omitzero"`
}

func (DeleteVolumeSetSpec) ValidationRule

func (DeleteVolumeSetSpec) ValidationRule() *validate.Rule

ValidationRule reflects ExpandVolumeSpec and applies the timeoutSeconds default. ValidationRule ports command.ts:404-406. `locations` is `Joi.array().items(Joi.string().required())` — a required ITEM, which is not the same as min(1): it rejects an explicit `[]` with array.includesRequiredUnknowns, and the tag DSL cannot spell "the item is required".

type DeleteVolumeSetStatus

type DeleteVolumeSetStatus map[string]DeleteVolumeSetLocationStatus

type DeleteVolumeSnapshotSpec

type DeleteVolumeSnapshotSpec struct {
	Location     string  `json:"location" validate:"required"`
	VolumeIndex  float64 `json:"volumeIndex" validate:"required"`
	SnapshotName string  `json:"snapshotName" validate:"required"`
}

type DeleteVolumeSnapshotStatus

type DeleteVolumeSnapshotStatus struct {
	ClusterId           string                                        `json:"clusterId,omitzero"`
	ClusterIdByLocation DeleteVolumeSnapshotStatusClusterIdByLocation `json:"clusterIdByLocation,omitzero"`
	Snapshot            volumeSet.VolumeSnapshot                      `json:"snapshot" validate:"required"`
	Stage               DeleteVolumeSnapshotStatusStage               `json:"stage,omitzero" validate:"required,default=delete-snapshot,valid=delete-snapshot|update-volume-set"`
	Messages            []string                                      `json:"messages,omitzero"`
	SnapshotId          string                                        `json:"snapshotId,omitzero"`
}

type DeleteVolumeSnapshotStatusClusterIdByLocation

type DeleteVolumeSnapshotStatusClusterIdByLocation map[string]string

type DeleteVolumeSnapshotStatusStage

type DeleteVolumeSnapshotStatusStage string
const (
	DeleteVolumeSnapshotStatusStageDeleteSnapshot        DeleteVolumeSnapshotStatusStage = "delete-snapshot"
	DeleteVolumeSnapshotStatusStageAwaitSnapshotDeletion DeleteVolumeSnapshotStatusStage = "await-snapshot-deletion"
	DeleteVolumeSnapshotStatusStageUpdateVolumeSet       DeleteVolumeSnapshotStatusStage = "update-volume-set"
)

type DeleteVolumeSpec

type DeleteVolumeSpec struct {
	Location    string  `json:"location" validate:"required"`
	VolumeIndex float64 `json:"volumeIndex" validate:"required"`
}

type DeleteVolumeStatus

type DeleteVolumeStatus struct {
	Stage                   DeleteVolumeStatusStage               `` /* 176-byte string literal not displayed */
	ClusterId               string                                `json:"clusterId,omitzero"`
	ClusterIdByLocation     DeleteVolumeStatusClusterIdByLocation `json:"clusterIdByLocation,omitzero"`
	Messages                []string                              `json:"messages,omitzero"`
	InUseByWorkloadId       string                                `json:"inUseByWorkloadId,omitzero"`
	StorageDeviceIdToRemove string                                `json:"storageDeviceIdToRemove,omitzero"`
}

type DeleteVolumeStatusClusterIdByLocation

type DeleteVolumeStatusClusterIdByLocation map[string]string

type DeleteVolumeStatusStage

type DeleteVolumeStatusStage string
const (
	DeleteVolumeStatusStageUpdateVolumeSet         DeleteVolumeStatusStage = "update-volume-set"
	DeleteVolumeStatusStageDeleteStorageResources  DeleteVolumeStatusStage = "delete-storage-resources"
	DeleteVolumeStatusStageShutdownReplica         DeleteVolumeStatusStage = "shutdown-replica"
	DeleteVolumeStatusStageAwaitReplicaTermination DeleteVolumeStatusStage = "await-replica-termination"
	DeleteVolumeStatusStageFail                    DeleteVolumeStatusStage = "fail"
	DeleteVolumeStatusStageCleanupK8S              DeleteVolumeStatusStage = "cleanup-k8s"
)

type ExpandVolumeSpec

type ExpandVolumeSpec struct {
	Location           string   `json:"location" validate:"required"`
	VolumeIndex        float64  `json:"volumeIndex" validate:"required"`
	NewStorageCapacity float64  `json:"newStorageCapacity" validate:"required"`
	TimeoutSeconds     *float64 `json:"timeoutSeconds,omitzero"`
}

ExpandVolumeSpec — timeoutSeconds default (600 when not >0) is a Refine.

func (ExpandVolumeSpec) ValidationRule

func (ExpandVolumeSpec) ValidationRule() *validate.Rule

type ExpandVolumeStatus

type ExpandVolumeStatus struct {
	ClusterId             string                                `json:"clusterId,omitzero"`
	ClusterIdByLocation   ExpandVolumeStatusClusterIdByLocation `json:"clusterIdByLocation,omitzero"`
	Messages              []string                              `json:"messages,omitzero"`
	Stage                 ExpandVolumeStatusStage               `` /* 229-byte string literal not displayed */
	ReplicaRestartedAt    string                                `json:"replicaRestartedAt,omitzero" validate:"date"`
	OnlineResizeStartedAt string                                `json:"onlineResizeStartedAt,omitzero" validate:"date"`
	LockNames             []string                              `json:"lockNames,omitzero"`
	StorageDeviceId       string                                `json:"storageDeviceId,omitzero"`
}

type ExpandVolumeStatusClusterIdByLocation

type ExpandVolumeStatusClusterIdByLocation map[string]string

type ExpandVolumeStatusStage

type ExpandVolumeStatusStage string
const (
	ExpandVolumeStatusStageExpandVolume            ExpandVolumeStatusStage = "expand-volume"
	ExpandVolumeStatusStageDeleteStatefulSet       ExpandVolumeStatusStage = "delete-stateful-set"
	ExpandVolumeStatusStageAwaitOnlineResize       ExpandVolumeStatusStage = "await-online-resize"
	ExpandVolumeStatusStageAwaitReplicaTermination ExpandVolumeStatusStage = "await-replica-termination"
	ExpandVolumeStatusStageAwaitExpansionCompleted ExpandVolumeStatusStage = "await-expansion-completed"
	ExpandVolumeStatusStageUpdateVolumeSet         ExpandVolumeStatusStage = "update-volume-set"
	ExpandVolumeStatusStageRecreateReplica         ExpandVolumeStatusStage = "recreate-replica"
	ExpandVolumeStatusStageCleanupK8S              ExpandVolumeStatusStage = "cleanup-k8s"
	ExpandVolumeStatusStageRevert                  ExpandVolumeStatusStage = "revert"
)

type ReplaceVolumeSpec

type ReplaceVolumeSpec struct {
	Location    string  `json:"location" validate:"required"`
	VolumeIndex float64 `json:"volumeIndex" validate:"required"`
}

type ReplaceVolumeStatus

type ReplaceVolumeStatus struct {
	Stage                   ReplaceVolumeStatusStage               `` /* 286-byte string literal not displayed */
	Messages                []string                               `json:"messages,omitzero"`
	ClusterId               string                                 `json:"clusterId,omitzero"`
	ClusterIdByLocation     ReplaceVolumeStatusClusterIdByLocation `json:"clusterIdByLocation,omitzero"`
	InUseByWorkloadId       string                                 `json:"inUseByWorkloadId,omitzero"`
	StorageDeviceIdToRemove string                                 `json:"storageDeviceIdToRemove,omitzero"`
	NewStorageDeviceId      string                                 `json:"newStorageDeviceId,omitzero"`
	NewVolumeAttributes     ReplaceVolumeStatusNewVolumeAttributes `json:"newVolumeAttributes,omitzero"`
	NewResourceName         string                                 `json:"newResourceName,omitzero"`
	NextVolumeSize          *float64                               `json:"nextVolumeSize,omitzero"`
	TempStorageClassName    string                                 `json:"tempStorageClassName,omitzero"`
	LockNames               []string                               `json:"lockNames,omitzero"`
}

type ReplaceVolumeStatusClusterIdByLocation

type ReplaceVolumeStatusClusterIdByLocation map[string]string

type ReplaceVolumeStatusNewVolumeAttributes

type ReplaceVolumeStatusNewVolumeAttributes map[string]string

ReplaceVolumeStatusNewVolumeAttributes = pattern(String, String().allow(”)) — the map value's allow(”) is a RegisterType.

func (ReplaceVolumeStatusNewVolumeAttributes) ValidationRule

type ReplaceVolumeStatusStage

type ReplaceVolumeStatusStage string
const (
	ReplaceVolumeStatusStageCreateVolume               ReplaceVolumeStatusStage = "create-volume"
	ReplaceVolumeStatusStageCleanupAfterVolumeCreation ReplaceVolumeStatusStage = "cleanup-after-volume-creation"
	ReplaceVolumeStatusStageUpdateVolumeSet            ReplaceVolumeStatusStage = "update-volume-set"
	ReplaceVolumeStatusStageConfigureStorageResources  ReplaceVolumeStatusStage = "configure-storage-resources"
	ReplaceVolumeStatusStageRemoveFinalizer            ReplaceVolumeStatusStage = "remove-finalizer"
	ReplaceVolumeStatusStageShutdownReplica            ReplaceVolumeStatusStage = "shutdown-replica"
	ReplaceVolumeStatusStageAwaitReplicaTermination    ReplaceVolumeStatusStage = "await-replica-termination"
	ReplaceVolumeStatusStageCleanupK8S                 ReplaceVolumeStatusStage = "cleanup-k8s"
	ReplaceVolumeStatusStageFail                       ReplaceVolumeStatusStage = "fail"
	ReplaceVolumeStatusStageRevert                     ReplaceVolumeStatusStage = "revert"
	ReplaceVolumeStatusStageCleanupOldStorageDevice    ReplaceVolumeStatusStage = "cleanup-old-storage-device"
	ReplaceVolumeStatusStageRestartReplica             ReplaceVolumeStatusStage = "restart-replica"
)

type RestoreVolumeSpec

type RestoreVolumeSpec struct {
	VolumeIndex  float64 `json:"volumeIndex" validate:"required"`
	Location     string  `json:"location" validate:"required"`
	SnapshotName string  `json:"snapshotName" validate:"required"`
	Zone         string  `json:"zone,omitzero" validate:"allow="`
}

type RunCronWorkloadSpec

type RunCronWorkloadSpec struct {
	Location              string                       `json:"location" validate:"required"`
	ScheduleName          string                       `json:"scheduleName,omitzero"`
	ContainerOverrides    []workload.ContainerOverride `json:"containerOverrides,omitzero"`
	ActiveDeadlineSeconds *float64                     `json:"activeDeadlineSeconds,omitzero" validate:"integer,min=1"`
}

type RunCronWorkloadStatus

type RunCronWorkloadStatus struct {
	Replica                     string                                    `json:"replica,omitzero"`
	ClusterIdByLocation         RunCronWorkloadStatusClusterIdByLocation  `json:"clusterIdByLocation,omitzero"`
	MinimumWorkloadVersion      *float64                                  `json:"minimumWorkloadVersion,omitzero"`
	Messages                    []string                                  `json:"messages,omitzero"`
	AdmissionRetries            *float64                                  `json:"admissionRetries,omitzero" validate:"integer"`
	FirstAdmissionRejectionTime string                                    `json:"firstAdmissionRejectionTime,omitzero"`
	LastRejectedReplica         string                                    `json:"lastRejectedReplica,omitzero"`
	AdmissionRetryRequested     *bool                                     `json:"admissionRetryRequested,omitzero"`
	RetryReason                 RunCronWorkloadStatusRetryReason          `json:"retryReason,omitzero" validate:"valid=admission-rejection|never-started"`
	InfraRetries                *float64                                  `json:"infraRetries,omitzero" validate:"integer"`
	Disruptions                 *float64                                  `json:"disruptions,omitzero" validate:"integer"`
	LastDisruptedReplica        string                                    `json:"lastDisruptedReplica,omitzero"`
	PendingTerminalStage        RunCronWorkloadStatusPendingTerminalStage `json:"pendingTerminalStage,omitzero" validate:"valid=completed|failed"`
	JobName                     string                                    `json:"jobName,omitzero"`
	WorkloadVersion             *float64                                  `json:"workloadVersion,omitzero" validate:"integer"`
	StartTime                   string                                    `json:"startTime,omitzero" validate:"date"`
	CompletionTime              string                                    `json:"completionTime,omitzero" validate:"date"`
	Conditions                  []cronjob.JobExecutionCondition           `json:"conditions,omitzero"`
	Containers                  RunCronWorkloadStatusContainers           `json:"containers,omitzero"`
	FirstImagePullBackOffTime   string                                    `json:"firstImagePullBackOffTime,omitzero" validate:"date"`
	Details                     RunCronWorkloadStatusDetails              `json:"details,omitzero" validate:"valid=invalid|removed"`
}

type RunCronWorkloadStatusClusterIdByLocation

type RunCronWorkloadStatusClusterIdByLocation map[string]string

type RunCronWorkloadStatusContainers added in v1.1.23

type RunCronWorkloadStatusContainers map[string]containerstatus.ContainerStatus

type RunCronWorkloadStatusDetails added in v1.1.23

type RunCronWorkloadStatusDetails string
const (
	RunCronWorkloadStatusDetailsInvalid RunCronWorkloadStatusDetails = "invalid"
	RunCronWorkloadStatusDetailsRemoved RunCronWorkloadStatusDetails = "removed"
)

type RunCronWorkloadStatusPendingTerminalStage added in v1.1.17

type RunCronWorkloadStatusPendingTerminalStage string
const (
	RunCronWorkloadStatusPendingTerminalStageCompleted RunCronWorkloadStatusPendingTerminalStage = "completed"
	RunCronWorkloadStatusPendingTerminalStageFailed    RunCronWorkloadStatusPendingTerminalStage = "failed"
)

type RunCronWorkloadStatusRetryReason added in v1.1.22

type RunCronWorkloadStatusRetryReason string
const (
	RunCronWorkloadStatusRetryReasonAdmissionRejection RunCronWorkloadStatusRetryReason = "admission-rejection"
	RunCronWorkloadStatusRetryReasonNeverStarted       RunCronWorkloadStatusRetryReason = "never-started"
)

type ShrinkVolumeSpec

type ShrinkVolumeSpec struct {
	Location           string   `json:"location" validate:"required"`
	VolumeIndex        float64  `json:"volumeIndex" validate:"required"`
	NewStorageCapacity float64  `json:"newStorageCapacity" validate:"required"`
	TimeoutSeconds     *float64 `json:"timeoutSeconds,omitzero"`
}

ShrinkVolumeSpec — timeoutSeconds default (600 when not >0) is a Refine.

func (ShrinkVolumeSpec) ValidationRule

func (ShrinkVolumeSpec) ValidationRule() *validate.Rule

ValidationRule reflects ShrinkVolumeSpec and applies the timeoutSeconds default.

type ShrinkVolumeStatus added in v1.1.4

type ShrinkVolumeStatus struct {
	Stage                   ShrinkVolumeStatusStage               `` /* 252-byte string literal not displayed */
	Messages                []string                              `json:"messages,omitzero"`
	ClusterId               string                                `json:"clusterId,omitzero"`
	ClusterIdByLocation     ShrinkVolumeStatusClusterIdByLocation `json:"clusterIdByLocation,omitzero"`
	InUseByWorkloadId       string                                `json:"inUseByWorkloadId,omitzero"`
	StorageDeviceIdToRemove string                                `json:"storageDeviceIdToRemove,omitzero"`
	OldVolumeAttributes     ShrinkVolumeStatusOldVolumeAttributes `json:"oldVolumeAttributes,omitzero"`
	OldVolumeSize           *float64                              `json:"oldVolumeSize,omitzero"`
	OldDiskType             volumeSet.DiskType                    `json:"oldDiskType,omitzero"`
	NewStorageDeviceId      string                                `json:"newStorageDeviceId,omitzero"`
	NewVolumeAttributes     ShrinkVolumeStatusNewVolumeAttributes `json:"newVolumeAttributes,omitzero"`
	NewResourceName         string                                `json:"newResourceName,omitzero"`
	NextVolumeSize          *float64                              `json:"nextVolumeSize,omitzero"`
	TempStorageClassName    string                                `json:"tempStorageClassName,omitzero"`
	LockNames               []string                              `json:"lockNames,omitzero"`
	PresyncTargetPodUid     string                                `json:"presyncTargetPodUid,omitzero"`
	PresyncAttempt          *float64                              `json:"presyncAttempt,omitzero"`
	PresyncProgressPercent  *float64                              `json:"presyncProgressPercent,omitzero"`
	FinalSyncCompletedAt    string                                `json:"finalSyncCompletedAt,omitzero" validate:"date"`
	AwaitDataReadySince     string                                `json:"awaitDataReadySince,omitzero" validate:"date"`
}

type ShrinkVolumeStatusClusterIdByLocation added in v1.1.4

type ShrinkVolumeStatusClusterIdByLocation map[string]string

type ShrinkVolumeStatusNewVolumeAttributes added in v1.1.15

type ShrinkVolumeStatusNewVolumeAttributes map[string]string

func (ShrinkVolumeStatusNewVolumeAttributes) ValidationRule

type ShrinkVolumeStatusOldVolumeAttributes added in v1.1.25

type ShrinkVolumeStatusOldVolumeAttributes map[string]string

func (ShrinkVolumeStatusOldVolumeAttributes) ValidationRule

type ShrinkVolumeStatusStage added in v1.1.4

type ShrinkVolumeStatusStage string
const (
	ShrinkVolumeStatusStageCreateVolume            ShrinkVolumeStatusStage = "create-volume"
	ShrinkVolumeStatusStageApplyPresyncResources   ShrinkVolumeStatusStage = "apply-presync-resources"
	ShrinkVolumeStatusStageInjectAndAwaitPresync   ShrinkVolumeStatusStage = "inject-and-await-presync"
	ShrinkVolumeStatusStageApplyDeltaSource        ShrinkVolumeStatusStage = "apply-delta-source"
	ShrinkVolumeStatusStageCommitAndPrepareSwap    ShrinkVolumeStatusStage = "commit-and-prepare-swap"
	ShrinkVolumeStatusStageShutdownReplica         ShrinkVolumeStatusStage = "shutdown-replica"
	ShrinkVolumeStatusStageAwaitReplicaTermination ShrinkVolumeStatusStage = "await-replica-termination"
	ShrinkVolumeStatusStageAwaitDataReady          ShrinkVolumeStatusStage = "await-data-ready"
	ShrinkVolumeStatusStageCleanupK8S              ShrinkVolumeStatusStage = "cleanup-k8s"
	ShrinkVolumeStatusStageFail                    ShrinkVolumeStatusStage = "fail"
)

type SnapshotDeletionStatus

type SnapshotDeletionStatus struct {
	Stage    SnapshotDeletionStatusStage `json:"stage,omitzero" validate:"default=pending,valid=pending|k8s-resources-created|deleted"`
	Messages []string                    `json:"messages,omitzero"`
}

type SnapshotDeletionStatusStage

type SnapshotDeletionStatusStage string
const (
	SnapshotDeletionStatusStagePending             SnapshotDeletionStatusStage = "pending"
	SnapshotDeletionStatusStageK8SResourcesCreated SnapshotDeletionStatusStage = "k8s-resources-created"
	SnapshotDeletionStatusStageDeleted             SnapshotDeletionStatusStage = "deleted"
)

type StopReplicaSpec

type StopReplicaSpec struct {
	Location string `json:"location" validate:"required"`
	Replica  string `json:"replica,omitzero"`
}

type StopReplicaStatus

type StopReplicaStatus struct {
	ClusterId               string                               `json:"clusterId,omitzero"`
	ClusterIdByLocation     StopReplicaStatusClusterIdByLocation `json:"clusterIdByLocation,omitzero"`
	PodCreatedByCommandLink string                               `json:"podCreatedByCommandLink,omitzero"`
	PodId                   string                               `json:"podId" validate:"required"`
}

type StopReplicaStatusClusterIdByLocation

type StopReplicaStatusClusterIdByLocation map[string]string

Jump to

Keyboard shortcuts

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