docker

package
v1.21.0-1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 License: Apache-2.0 Imports: 11 Imported by: 5

Documentation

Index

Constants

View Source
const (

	// CapNetAdmin to start agent with NET_ADMIN capability
	// For more information on capabilities, please read this manpage:
	// http://man7.org/linux/man-pages/man7/capabilities.7.html
	CapNetAdmin = "NET_ADMIN"
	// CapSysAdmin to start agent with SYS_ADMIN capability
	// This is needed for the ECS Agent to invoke the setns call when
	// configuring the network namespace of the pause container
	// For more information on setns, please read this manpage:
	// http://man7.org/linux/man-pages/man2/setns.2.html
	CapSysAdmin = "SYS_ADMIN"
	// DefaultCgroupMountpoint is the default mount point for the cgroup subsystem
	DefaultCgroupMountpoint = "/sys/fs/cgroup"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client enables business logic for running the Agent inside Docker

func NewClient

func NewClient() (*Client, error)

NewClient reutrns a new Client

func (*Client) IsAgentImageLoaded

func (c *Client) IsAgentImageLoaded() (bool, error)

IsAgentImageLoaded returns true if the Agent image is loaded in Docker

func (*Client) LoadImage

func (c *Client) LoadImage(image io.Reader) error

LoadImage loads an io.Reader into Docker

func (*Client) RemoveExistingAgentContainer

func (c *Client) RemoveExistingAgentContainer() error

RemoveExistingAgentContainer remvoes any existing container named "ecs-agent" or returns without error if none is found

func (*Client) StartAgent

func (c *Client) StartAgent() (int, error)

StartAgent starts the Agent in Docker and returns the exit code from the container

func (*Client) StopAgent

func (c *Client) StopAgent() error

StopAgent stops the Agent in docker if one is running

Jump to

Keyboard shortcuts

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