machine

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: Apache-2.0 Imports: 29 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists added in v1.14.0

func Exists(name string) (bool, error)

func GetProxyConfig

func GetProxyConfig(machineName string) (*network.ProxyConfig, error)

Return proxy config if VM is present

func IsRunning

func IsRunning(st state.State) bool

func SupportedDriverValues

func SupportedDriverValues() []string

Types

type ClusterConfig

type ClusterConfig struct {
	KubeConfig    string
	KubeAdminPass string
	ClusterAPI    string
	WebConsoleURL string
	ProxyConfig   *network.ProxyConfig
}

type ClusterStatusConfig

type ClusterStatusConfig struct {
	Name string
}

type ClusterStatusResult

type ClusterStatusResult struct {
	Name             string
	CrcStatus        string
	OpenshiftStatus  string
	OpenshiftVersion string
	DiskUse          int64
	DiskSize         int64
	Error            string
	Success          bool
}

func Status

func Status(statusConfig ClusterStatusConfig) (ClusterStatusResult, error)

type ConsoleConfig

type ConsoleConfig struct {
	Name string
}

type ConsoleResult

type ConsoleResult struct {
	ClusterConfig ClusterConfig
	State         state.State
	Success       bool
	Error         string
}

func GetConsoleURL

func GetConsoleURL(consoleConfig ConsoleConfig) (ConsoleResult, error)

Return console URL if the VM is present.

type DeleteConfig

type DeleteConfig struct {
	Name string
}

type DeleteResult

type DeleteResult struct {
	Name    string
	Success bool
	Error   string
}

func Delete

func Delete(deleteConfig DeleteConfig) (DeleteResult, error)

type Driver added in v1.14.0

type Driver struct {
	Name       string
	Platform   crcos.OS
	Driver     string
	DriverPath string
}
var (
	SupportedDrivers []Driver
	DefaultDriver    Driver
)

type GetPullSecretFunc

type GetPullSecretFunc func() (string, error)

type IPConfig added in v1.14.0

type IPConfig struct {
	Name  string
	Debug bool
}

type IPResult added in v1.14.0

type IPResult struct {
	Name    string
	IP      string
	Success bool
	Error   string
}

func IP added in v1.14.0

func IP(ipConfig IPConfig) (IPResult, error)

type PowerOffConfig

type PowerOffConfig struct {
	Name string
}

type PowerOffResult

type PowerOffResult struct {
	Name    string
	Success bool
	Error   string
}

func PowerOff

func PowerOff(powerOff PowerOffConfig) (PowerOffResult, error)

type StartConfig

type StartConfig struct {
	Name string

	// CRC system bundle
	BundlePath string

	// Hypervisor
	Memory int
	CPUs   int

	// Nameserver
	NameServer string

	// Machine log output
	Debug bool

	// User Pull secret
	GetPullSecret GetPullSecretFunc
}

type StartResult

type StartResult struct {
	Name           string
	Status         string
	Error          string
	ClusterConfig  ClusterConfig
	KubeletStarted bool
}

func Start

func Start(startConfig StartConfig) (StartResult, error)

type StopConfig

type StopConfig struct {
	Name  string
	Debug bool
}

type StopResult

type StopResult struct {
	Name    string
	Success bool
	State   state.State
	Error   string
}

func Stop

func Stop(stopConfig StopConfig) (StopResult, error)

type VersionResult

type VersionResult struct {
	CrcVersion       string
	CommitSha        string
	OpenshiftVersion string
	Success          bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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