docker

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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTaskNotFound = fmt.Errorf("task not found")

Functions

This section is empty.

Types

type Docker

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

func NewDockerDriver

func NewDockerDriver(logger hclog.Logger, networkName string) (*Docker, error)

func NewTestDockerDriver

func NewTestDockerDriver(t *testing.T) *Docker

func (*Docker) CreateNetwork

func (d *Docker) CreateNetwork(allocID string, hostname string) (*structs.NetworkSpec, bool, error)

func (*Docker) DestroyNetwork

func (d *Docker) DestroyNetwork(spec *structs.NetworkSpec) error

func (*Docker) DestroyTask

func (d *Docker) DestroyTask(taskID string, force bool) error

func (*Docker) ExecTask

func (d *Docker) ExecTask(taskID string, cmd []string) (*driver.ExecTaskResult, error)

func (*Docker) RecoverTask

func (d *Docker) RecoverTask(taskID string, task *proto.TaskHandle) error

func (*Docker) StartTask

func (d *Docker) StartTask(task *driver.Task) (*proto.TaskHandle, error)

func (*Docker) StopTask

func (d *Docker) StopTask(taskID string, timeout time.Duration) error

func (*Docker) WaitTask

func (d *Docker) WaitTask(ctx context.Context, taskID string) (<-chan *proto.ExitResult, error)

Jump to

Keyboard shortcuts

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