container

package
v0.0.0-...-6cb77cc Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Image   string // Image to create container
	Storage string // Path of the directory to be mounted on container
}

Config holds the configuration for the container.

type Container

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

Container describes container.

func NewContainer

func NewContainer(ctx context.Context, conf Config) (c Container, e error)

NewContainer creates a new container based on the given configuration and returns its descriptor.

func (Container) ID

func (c Container) ID() string

ID returns the ID of this container.

func (Container) IP

func (c Container) IP() string

IP returns the IP address of this container.

func (Container) Inspect

func (c Container) Inspect(ctx context.Context) (i types.ContainerJSON, e error)

Inspect returns detailed information on this container.

func (Container) IsExists

func (c Container) IsExists(ctx context.Context) (ok bool)

IsExists checks if this container exists.

func (Container) Pause

func (c Container) Pause()

func (Container) Remove

func (c Container) Remove(ctx context.Context) (e error)

Remove removes a container.

func (*Container) Start

func (c *Container) Start(ctx context.Context) (e error)

Start starts this container.

func (Container) Unpause

func (c Container) Unpause()

Jump to

Keyboard shortcuts

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