machinerunner

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MachineRunner

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

func New

func New(
	store state.Store,
	machine structs.MachineInstance,
	runtime daemon.Runtime,
	reportState func(mi cluster.MachineInstance) error,
	eventer state.Eventer,
	onDestroyed func(m structs.MachineInstance),
) *MachineRunner

func (*MachineRunner) Destroy

func (m *MachineRunner) Destroy(ctx context.Context, force bool) error

func (*MachineRunner) DisableGateway added in v0.5.0

func (m *MachineRunner) DisableGateway(ctx context.Context) error

func (*MachineRunner) EnableGateway added in v0.5.0

func (m *MachineRunner) EnableGateway(ctx context.Context) error

func (*MachineRunner) Exec

func (m *MachineRunner) Exec(ctx context.Context, cmd []string, timeout time.Duration) (*api.ExecResult, error)

func (*MachineRunner) GetLogs

func (m *MachineRunner) GetLogs() ([]*api.LogEntry, error)

func (*MachineRunner) Id

func (m *MachineRunner) Id() string

func (*MachineRunner) Run

func (m *MachineRunner) Run()

func (*MachineRunner) Start

func (m *MachineRunner) Start(ctx context.Context) error

func (*MachineRunner) Stop

func (m *MachineRunner) Stop(ctx context.Context, stopConfig *api.StopConfig) error

func (*MachineRunner) SubscribeToLogs

func (m *MachineRunner) SubscribeToLogs(ctx context.Context, id string) ([]*api.LogEntry, <-chan *api.LogEntry, error)

func (*MachineRunner) WaitForStatus added in v0.6.0

func (m *MachineRunner) WaitForStatus(ctx context.Context, status api.MachineStatus) error

type Store

type Store interface {
	GetMachine(id string) (*MachineRunner, error)
	Foreach(func(*MachineRunner))
	AddMachine(machine *MachineRunner)
	RemoveMachine(id string)
}

func NewStore

func NewStore() Store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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