machine

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2020 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 MachineExists

func MachineExists(name string) (bool, error)

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
	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 GetPullSecretFunc

type GetPullSecretFunc func() (string, error)

type IpConfig

type IpConfig struct {
	Name  string
	Debug bool
}

type IpResult

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

func Ip

func Ip(ipConfig IpConfig) (IpResult, error)

type MachineDriver

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

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