multipass

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMultipassProviderConfiguration

func NewMultipassProviderConfiguration(fileName string) (providers.ProviderConfiguration, error)

Types

type Configuration

type Configuration struct {
	Address           string             `json:"address"` // external cluster autoscaler provider address of the form "host:port", "host%zone:port", "[host]:port" or "[host%zone]:port"
	Key               string             `json:"key"`     // path to file containing the tls key
	Cert              string             `json:"cert"`    // path to file containing the tls certificate
	Cacert            string             `json:"cacert"`  // path to file containing the CA certificate
	Timeout           time.Duration      `json:"timeout"`
	TemplateName      string             `json:"template-name"`
	NetplanFileName   string             `default:"10-custom.yaml" json:"netplan-name"`
	AvailableGPUTypes map[string]string  `json:"gpu-types"`
	VMWareRegion      string             `default:"home" json:"region"`
	VMWareZone        string             `default:"office" json:"zone"`
	Network           *providers.Network `json:"network" `
	Mounts            []MountPoint       `json:"mounts"`
	UseBind9          bool               `json:"use-bind9"`
	Bind9Host         string             `json:"bind9-host"`
	RndcKeyFile       string             `json:"rndc-key-file"`
}

Configuration declares multipass connection info

type MountPoint

type MountPoint struct {
	LocalPath    string
	InstancePath string
}

type MultipassVMInfos

type MultipassVMInfos struct {
	Errors []any               `json:"errors"`
	Info   map[string]VMStatus `json:"info"`
}

type VMStatus

type VMStatus struct {
	CPUCount string `json:"cpu_count"`
	Disks    struct {
		Sda1 struct {
			Total string `json:"total"`
			Used  string `json:"used"`
		} `json:"sda1"`
	} `json:"disks"`
	ImageHash    string    `json:"image_hash"`
	ImageRelease string    `json:"image_release"`
	Ipv4         []string  `json:"ipv4"`
	Load         []float64 `json:"load"`
	Memory       struct {
		Total int64 `json:"total"`
		Used  int64 `json:"used"`
	} `json:"memory"`
	Mounts struct {
		Home struct {
			GidMappings []string `json:"gid_mappings"`
			SourcePath  string   `json:"source_path"`
			UIDMappings []string `json:"uid_mappings"`
		} `json:"Home"`
	} `json:"mounts"`
	Release string `json:"release"`
	State   string `json:"state"`
}

func (*VMStatus) Address

func (status *VMStatus) Address() string

func (*VMStatus) Powered

func (status *VMStatus) Powered() bool

Jump to

Keyboard shortcuts

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