machine

package
v2.34.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 61 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfMachineMissing

func CheckIfMachineMissing(client Client) error

Types

type Client

type Client interface {
	GetName() string
	GetConsoleURL() (*types.ConsoleResult, error)
	ConnectionDetails() (*types.ConnectionDetails, error)

	Delete() error
	Exists() (bool, error)
	PowerOff() error
	Start(ctx context.Context, startConfig types.StartConfig) (*types.StartResult, error)
	Status() (*types.ClusterStatusResult, error)
	GetClusterLoad() (*types.ClusterLoadResult, error)
	Stop() (state.State, error)
	IsRunning() (bool, error)
	GenerateBundle(forceStop bool) error
	GetPreset() crcPreset.Preset
}

func NewClient

func NewClient(name string, debug bool, config crcConfig.Storage) Client

type MissingHostError

type MissingHostError struct {
	// contains filtered or unexported fields
}

func (*MissingHostError) Error

func (err *MissingHostError) Error() string

type State

type State string
const (
	Idle     State = "Idle"
	Deleting State = "Deleting"
	Stopping State = "Stopping"
	Starting State = "Starting"
)

type Synchronized

type Synchronized struct {
	// contains filtered or unexported fields
}

func NewSynchronizedMachine

func NewSynchronizedMachine(machine Client) *Synchronized

func (*Synchronized) ConnectionDetails

func (s *Synchronized) ConnectionDetails() (*types.ConnectionDetails, error)

func (*Synchronized) CurrentState

func (s *Synchronized) CurrentState() State

func (*Synchronized) Delete

func (s *Synchronized) Delete() error

func (*Synchronized) Exists

func (s *Synchronized) Exists() (bool, error)

func (*Synchronized) GenerateBundle

func (s *Synchronized) GenerateBundle(forceStop bool) error

func (*Synchronized) GetClusterLoad

func (s *Synchronized) GetClusterLoad() (*types.ClusterLoadResult, error)

func (*Synchronized) GetConsoleURL

func (s *Synchronized) GetConsoleURL() (*types.ConsoleResult, error)

func (*Synchronized) GetName

func (s *Synchronized) GetName() string

func (*Synchronized) GetPreset

func (s *Synchronized) GetPreset() crcPreset.Preset

func (*Synchronized) IsRunning

func (s *Synchronized) IsRunning() (bool, error)

func (*Synchronized) PowerOff

func (s *Synchronized) PowerOff() error

func (*Synchronized) Start

func (s *Synchronized) Start(ctx context.Context, startConfig types.StartConfig) (*types.StartResult, error)

func (*Synchronized) Status

func (s *Synchronized) Status() (*types.ClusterStatusResult, error)

func (*Synchronized) Stop

func (s *Synchronized) Stop() (state.State, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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