machine

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: Apache-2.0 Imports: 41 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRunning

func IsRunning(st state.State) bool

func WriteKubeconfig added in v1.15.0

func WriteKubeconfig(ip string, clusterConfig *ClusterConfig) error

Types

type Client added in v1.15.0

type Client interface {
	Delete(deleteConfig DeleteConfig) (DeleteResult, error)
	Exists(name string) (bool, error)
	GetConsoleURL(consoleConfig ConsoleConfig) (ConsoleResult, error)
	IP(ipConfig IPConfig) (IPResult, error)
	PowerOff(powerOff PowerOffConfig) (PowerOffResult, error)
	Start(startConfig StartConfig) (StartResult, error)
	Status(statusConfig ClusterStatusConfig) (ClusterStatusResult, error)
	Stop(stopConfig StopConfig) (StopResult, error)
}

func NewClient added in v1.15.0

func NewClient() Client

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
}

type ConsoleConfig

type ConsoleConfig struct {
	Name string
}

type ConsoleResult

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

type DeleteConfig

type DeleteConfig struct {
	Name string
}

type DeleteResult

type DeleteResult struct {
	Name    string
	Success bool
	Error   string
}

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
}

type PowerOffConfig

type PowerOffConfig struct {
	Name string
}

type PowerOffResult

type PowerOffResult struct {
	Name    string
	Success bool
	Error   string
}

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
}

type StopConfig

type StopConfig struct {
	Name  string
	Debug bool
}

type StopResult

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

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