volumes

package
v0.29.3-dev4 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(c *gcorecloud.ServiceClient, clusterID string) pagination.Pager

List retrieves list of volumes for GPU virtual cluster

Types

type ClusterInstanceVolume

type ClusterInstanceVolume struct {
	ID        string             `json:"id"`
	ServerID  string             `json:"server_id"`
	Name      string             `json:"name"`
	Type      string             `json:"type"`
	Status    string             `json:"status"`
	Size      int                `json:"size"`
	Bootable  bool               `json:"bootable"`
	Metadata  []DetailedMetadata `json:"metadata"`
	CreatedAt time.Time          `json:"created_at"`
}

ClusterInstanceVolume represents a volume in a cluster

func ExtractVolumes

func ExtractVolumes(r pagination.Page) ([]ClusterInstanceVolume, error)

ExtractVolumes extracts volumes from a ClusterInstanceVolumesList

type ClusterInstanceVolumesList

type ClusterInstanceVolumesList struct {
	Count   int                     `json:"count"`
	Results []ClusterInstanceVolume `json:"results"`
}

ClusterInstanceVolumesList represents a paginated list of volumes

func (ClusterInstanceVolumesList) GetBody

func (r ClusterInstanceVolumesList) GetBody() interface{}

GetBody implements pagination.Page interface

type DetailedMetadata

type DetailedMetadata struct {
	Key      string `json:"key"`
	Value    string `json:"value"`
	ReadOnly bool   `json:"read_only"`
}

DetailedMetadata represents metadata with read-only flag

type GetResult

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

GetResult represents the result of a get operation.

func (GetResult) Extract

func (r GetResult) Extract() (*ClusterInstanceVolumesList, error)

Extract is a function that accepts a result and extracts a volume resource.

func (GetResult) IsEmpty

func (r GetResult) IsEmpty() (bool, error)

IsEmpty checks if the volume list is empty

Jump to

Keyboard shortcuts

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