docker

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotStopped is an error that is thrown when an instance is attempted to be
	// started but is found to be not stopped
	ErrNotStopped = errors.New("not stopped")
)

Contains all of the error types for this package

Functions

This section is empty.

Types

type Client

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

Client is a docker client

func NewClient

func NewClient() (*Client, error)

NewClient creates a new client

func (*Client) ShouldTerminate

func (c *Client) ShouldTerminate(ctx context.Context) (bool, error)

ShouldTerminate returns true if the instance should be terminated.

func (*Client) Start

func (c *Client) Start(ctx context.Context, containerID string) error

Start starts a container

func (*Client) Status

func (c *Client) Status(ctx context.Context, containerID string) (cloud.ProviderStatus, error)

Status returns the status of a container

func (*Client) Stop

func (c *Client) Stop(ctx context.Context, containerID string) error

Stop stops a container

Jump to

Keyboard shortcuts

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