proxmox

package
v0.0.0-...-0ce8efd Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRunning

func IsRunning(ctx context.Context, vm VirtualMachine) (bool, error)

func IsStopped

func IsStopped(ctx context.Context, vm VirtualMachine) (bool, error)

func StartVM

func StartVM(ctx context.Context, vm VirtualMachine) error

func StopVM

func StopVM(ctx context.Context, vm VirtualMachine) error

Types

type Filter

type Filter func(vm VirtualMachine) bool

func FilterByIDs

func FilterByIDs(ids ...string) Filter

func FilterByNames

func FilterByNames(names ...string) Filter

func FilterByTags

func FilterByTags(tags ...string) Filter

func FilterIsVM

func FilterIsVM() Filter

type ListOptions

type ListOptions struct {
	Filters  []Filter
	SortFunc func(a VirtualMachine, b VirtualMachine) int
}

type SortFunc

type SortFunc func(a VirtualMachine, b VirtualMachine) int

func SortByIDs

func SortByIDs(ids ...string) SortFunc

func SortByNames

func SortByNames(names ...string) SortFunc

func SortByTags

func SortByTags(tags ...string) SortFunc

type VirtualMachine

type VirtualMachine struct {
	ID         uint64
	CPU        float64
	Disk       uint64
	Mem        uint64
	Name       string
	Node       string
	Status     string
	Storage    string
	Tags       string
	Uptime     uint64
	IsTemplate bool
}

func ListVMs

func ListVMs(ctx context.Context, opt *ListOptions) ([]VirtualMachine, error)

Jump to

Keyboard shortcuts

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