allocrunner

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocRunner

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

func NewAllocRunner

func NewAllocRunner(c *Config) (*AllocRunner, error)

func (*AllocRunner) Alloc

func (a *AllocRunner) Alloc() *proto.Allocation

func (*AllocRunner) AllocStatus

func (a *AllocRunner) AllocStatus() proto.Allocation_Status

func (*AllocRunner) Deployment

func (a *AllocRunner) Deployment() *proto.Deployment

func (*AllocRunner) Destroy

func (a *AllocRunner) Destroy()

func (*AllocRunner) DestroyCh

func (a *AllocRunner) DestroyCh() chan struct{}

func (*AllocRunner) Restore

func (a *AllocRunner) Restore() error

func (*AllocRunner) Run

func (a *AllocRunner) Run()

func (*AllocRunner) SetNetworkSpec

func (a *AllocRunner) SetNetworkSpec(spec *proto.NetworkSpec)

func (*AllocRunner) Shutdown

func (a *AllocRunner) Shutdown()

func (*AllocRunner) ShutdownCh

func (a *AllocRunner) ShutdownCh() chan struct{}

func (*AllocRunner) TaskStateUpdated

func (a *AllocRunner) TaskStateUpdated()

func (*AllocRunner) Update

func (a *AllocRunner) Update(deployment *proto.Deployment)

func (*AllocRunner) WaitCh

func (a *AllocRunner) WaitCh() <-chan struct{}

type Config

type Config struct {
	Logger          hclog.Logger
	Alloc           *proto.Allocation
	State           state.State
	StateUpdater    StateUpdater
	Driver          driver.Driver
	ClientVolumeDir string
	Hooks           []hooks.TaskHookFactory
}

type StateUpdater

type StateUpdater interface {
	AllocStateUpdated(alloc *proto.Allocation)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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