configs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClusterRootfsDir = ""
View Source
var ErrTypeNotFound = errors.New("no type structure was found")
View Source
var ErrVirtualMachineFileNotExists = errors.New("the vm file is not exist")

Functions

func DefaultRootfsDir

func DefaultRootfsDir() string

func GetDataDir

func GetDataDir(clusterName string) string

func GetEtcDir

func GetEtcDir(clusterName string) string

func GetVirtualMachineFromDataCompatV1

func GetVirtualMachineFromDataCompatV1(data []byte) (*v1.VirtualMachine, error)

func VirtualMachineFilePath

func VirtualMachineFilePath(clusterName string) string

Types

type Interface

type Interface interface {
	PreProcessor
	GetVirtualMachine() *v1.VirtualMachine
}

func NewVirtualMachineFile

func NewVirtualMachineFile(name string, opts ...OptionFunc) Interface

type OptionFunc

type OptionFunc func(*VirtualMachineFile)

type PreProcessor

type PreProcessor interface {
	Process() error
}

type VirtualMachineFile

type VirtualMachineFile struct {
	VirtualMachine *v1.VirtualMachine
	// contains filtered or unexported fields
}

func (*VirtualMachineFile) DecodeVirtualMachine

func (c *VirtualMachineFile) DecodeVirtualMachine(data []byte) error

func (*VirtualMachineFile) GetVirtualMachine

func (c *VirtualMachineFile) GetVirtualMachine() *v1.VirtualMachine

func (*VirtualMachineFile) Process

func (c *VirtualMachineFile) Process() (err error)

Jump to

Keyboard shortcuts

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