Documentation
¶
Index ¶
- type MachineRunner
- func (m *MachineRunner) Destroy(ctx context.Context, force bool) error
- func (m *MachineRunner) DisableGateway(ctx context.Context) error
- func (m *MachineRunner) EnableGateway(ctx context.Context) error
- func (m *MachineRunner) Exec(ctx context.Context, cmd []string, timeout time.Duration) (*api.ExecResult, error)
- func (m *MachineRunner) GetLogs() ([]*api.LogEntry, error)
- func (m *MachineRunner) Id() string
- func (m *MachineRunner) Run()
- func (m *MachineRunner) Start(ctx context.Context) error
- func (m *MachineRunner) Stop(ctx context.Context, stopConfig *api.StopConfig) error
- func (m *MachineRunner) SubscribeToLogs(ctx context.Context, id string) ([]*api.LogEntry, <-chan *api.LogEntry, error)
- func (m *MachineRunner) WaitForStatus(ctx context.Context, status api.MachineStatus) error
- type Store
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) Id ¶
func (m *MachineRunner) Id() string
func (*MachineRunner) Run ¶
func (m *MachineRunner) Run()
func (*MachineRunner) Stop ¶
func (m *MachineRunner) Stop(ctx context.Context, stopConfig *api.StopConfig) error
func (*MachineRunner) SubscribeToLogs ¶
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) }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.