instanceinfo

package
v0.0.0-...-595af85 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 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

Overview

Package instanceinfo provides functionality for interfacing with the compute API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeviceType

func DeviceType(diskType string) string

DeviceType returns a formatted device type for a given disk type and name. The returned device type will be formatted as: "LOCAL-SSD" or "PERSISTENT-SSD". "OTHER" if another disk type

Types

type Disks

type Disks struct {
	DeviceName string
	DiskType   string
	Mapping    string
}

Disks contains information about a device name and the disk type

type Reader

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

Reader handles the retrieval of instance properties from a compute client instance.

func New

func New(gceService gceInterface) *Reader

New instantiates a Reader with default instance properties.

func NewReader

func NewReader(gceService gceInterface) *Reader

NewReader instantiates a Reader with gceService

func (*Reader) AllDisks

func (r *Reader) AllDisks(ctx context.Context, projectID, zone, instanceID string) ([]*Disks, error)

AllDisks returns all possible disks with data from compute instance call Returns nil with error if the service account is missing Compute Viewer IAM role.

Jump to

Keyboard shortcuts

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