state

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boot

type Boot string
const (
	Active   Boot = "active_boot"
	Passive  Boot = "passive_boot"
	Recovery Boot = "recovery_boot"
	LiveCD   Boot = "livecd_boot"
	Unknown  Boot = "unknown"
)

type Machine

type Machine struct {
	BootArgs    []string
	CloudConfig string
}

type PartitionState

type PartitionState struct {
	Mounted    bool   `yaml:"mounted" json:"mounted"`
	Name       string `yaml:"name" json:"name"`
	Label      string `yaml:"label" json:"label"`
	MountPoint string `yaml:"mount_point" json:"mount_point"`
	SizeBytes  uint64 `yaml:"size_bytes" json:"size_bytes"`
	Type       string `yaml:"type" json:"type"`
	IsReadOnly bool   `yaml:"read_only" json:"read_only"`
	Found      bool   `yaml:"found" json:"found"`
	UUID       string `yaml:"uuid" json:"uuid"` // This would be volume UUID on macOS, PartUUID on linux, empty on Windows
}

type Runtime

type Runtime struct {
	UUID       string         `yaml:"uuid" json:"uuid"`
	Persistent PartitionState `yaml:"persistent" json:"persistent"`
	Recovery   PartitionState `yaml:"recovery" json:"recovery"`
	OEM        PartitionState `yaml:"oem" json:"oem"`
	State      PartitionState `yaml:"state" json:"state"`
	BootState  Boot           `yaml:"boot" json:"boot"`
}

func NewRuntime

func NewRuntime() (Runtime, error)

func (Runtime) Query

func (r Runtime) Query(s string) (res string, err error)

func (Runtime) String

func (r Runtime) String() string

type Spec

type Spec struct {
	MachineSpec Machine
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳