api

package
v0.9.1-0...-99dafce Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2014 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIVERSION        = "1.10"
	DEFAULTHTTPHOST   = "127.0.0.1"
	DEFAULTUNIXSOCKET = "/var/run/docker.sock"
)

Variables

View Source
var (
	ErrConnectionRefused = errors.New("Cannot connect to the Docker daemon. Is 'docker -d' running on this host?")
)

Functions

func AcceptConnections added in v0.8.1

func AcceptConnections(job *engine.Job) engine.Status

func AttachProfiler

func AttachProfiler(router *mux.Router)

func ListenAndServe

func ListenAndServe(proto, addr string, eng *engine.Engine, logging, enableCors bool, dockerVersion string, socketGroup string) error

ListenAndServe sets up the required http.Server and gets it listening for each addr passed in and does protocol specific checking.

func MatchesContentType

func MatchesContentType(contentType, expectedType string) bool

func ParseCommands added in v0.8.1

func ParseCommands(proto, addr string, args ...string) error

func ServeApi

func ServeApi(job *engine.Job) engine.Status

ServeApi loops through all of the protocols sent in to docker and spawns off a go routine to setup a serving http.Server for each.

func ServeFd

func ServeFd(addr string, handle http.Handler) error

ServeFD creates an http.Server and sets it up to serve given a socket activated argument.

func ServeRequest

func ServeRequest(eng *engine.Engine, apiversion version.Version, w http.ResponseWriter, req *http.Request) error

ServeRequest processes a single http request to the docker remote api. FIXME: refactor this to be part of Server and not require re-creating a new router each time. This requires first moving ListenAndServe into Server.

func ValidateHost added in v0.8.1

func ValidateHost(val string) (string, error)

Types

type Container added in v0.8.1

type Container struct {
	Config     runconfig.Config
	HostConfig runconfig.HostConfig
	State      struct {
		Running  bool
		ExitCode int
	}
	NetworkSettings struct {
		Ports nat.PortMap
	}
}

type DockerCli added in v0.8.1

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

func NewDockerCli added in v0.8.1

func NewDockerCli(in io.ReadCloser, out, err io.Writer, proto, addr string) *DockerCli

func (*DockerCli) CmdAttach added in v0.8.1

func (cli *DockerCli) CmdAttach(args ...string) error

func (*DockerCli) CmdBuild added in v0.8.1

func (cli *DockerCli) CmdBuild(args ...string) error

func (*DockerCli) CmdCommit added in v0.8.1

func (cli *DockerCli) CmdCommit(args ...string) error

func (*DockerCli) CmdCp added in v0.8.1

func (cli *DockerCli) CmdCp(args ...string) error

func (*DockerCli) CmdDiff added in v0.8.1

func (cli *DockerCli) CmdDiff(args ...string) error

func (*DockerCli) CmdEvents added in v0.8.1

func (cli *DockerCli) CmdEvents(args ...string) error

func (*DockerCli) CmdExport added in v0.8.1

func (cli *DockerCli) CmdExport(args ...string) error

func (*DockerCli) CmdHelp added in v0.8.1

func (cli *DockerCli) CmdHelp(args ...string) error

func (*DockerCli) CmdHistory added in v0.8.1

func (cli *DockerCli) CmdHistory(args ...string) error

func (*DockerCli) CmdImages added in v0.8.1

func (cli *DockerCli) CmdImages(args ...string) error

func (*DockerCli) CmdImport added in v0.8.1

func (cli *DockerCli) CmdImport(args ...string) error

func (*DockerCli) CmdInfo added in v0.8.1

func (cli *DockerCli) CmdInfo(args ...string) error

'docker info': display system-wide information.

func (*DockerCli) CmdInsert added in v0.8.1

func (cli *DockerCli) CmdInsert(args ...string) error

func (*DockerCli) CmdInspect added in v0.8.1

func (cli *DockerCli) CmdInspect(args ...string) error

func (*DockerCli) CmdKill added in v0.8.1

func (cli *DockerCli) CmdKill(args ...string) error

'docker kill NAME' kills a running container

func (*DockerCli) CmdLoad added in v0.8.1

func (cli *DockerCli) CmdLoad(args ...string) error

func (*DockerCli) CmdLogin added in v0.8.1

func (cli *DockerCli) CmdLogin(args ...string) error

'docker login': login / register a user to registry service.

func (*DockerCli) CmdLogs added in v0.8.1

func (cli *DockerCli) CmdLogs(args ...string) error

func (*DockerCli) CmdPort added in v0.8.1

func (cli *DockerCli) CmdPort(args ...string) error

func (*DockerCli) CmdPs added in v0.8.1

func (cli *DockerCli) CmdPs(args ...string) error

func (*DockerCli) CmdPull added in v0.8.1

func (cli *DockerCli) CmdPull(args ...string) error

func (*DockerCli) CmdPush added in v0.8.1

func (cli *DockerCli) CmdPush(args ...string) error

func (*DockerCli) CmdRestart added in v0.8.1

func (cli *DockerCli) CmdRestart(args ...string) error

func (*DockerCli) CmdRm added in v0.8.1

func (cli *DockerCli) CmdRm(args ...string) error

func (*DockerCli) CmdRmi added in v0.8.1

func (cli *DockerCli) CmdRmi(args ...string) error

'docker rmi IMAGE' removes all images with the name IMAGE

func (*DockerCli) CmdRun added in v0.8.1

func (cli *DockerCli) CmdRun(args ...string) error

func (*DockerCli) CmdSave added in v0.8.1

func (cli *DockerCli) CmdSave(args ...string) error

func (*DockerCli) CmdSearch added in v0.8.1

func (cli *DockerCli) CmdSearch(args ...string) error

func (*DockerCli) CmdStart added in v0.8.1

func (cli *DockerCli) CmdStart(args ...string) error

func (*DockerCli) CmdStop added in v0.8.1

func (cli *DockerCli) CmdStop(args ...string) error

func (*DockerCli) CmdTag added in v0.8.1

func (cli *DockerCli) CmdTag(args ...string) error

func (*DockerCli) CmdTop added in v0.8.1

func (cli *DockerCli) CmdTop(args ...string) error

func (*DockerCli) CmdVersion added in v0.8.1

func (cli *DockerCli) CmdVersion(args ...string) error

'docker version': show version information

func (*DockerCli) CmdWait added in v0.8.1

func (cli *DockerCli) CmdWait(args ...string) error

'docker wait': block until a container stops

func (*DockerCli) LoadConfigFile added in v0.8.1

func (cli *DockerCli) LoadConfigFile() (err error)

func (*DockerCli) Subcmd added in v0.8.1

func (cli *DockerCli) Subcmd(name, signature, description string) *flag.FlagSet

func (*DockerCli) WalkTree added in v0.8.1

func (cli *DockerCli) WalkTree(noTrunc bool, images *engine.Table, byParent map[string]*engine.Table, prefix string, printNode func(cli *DockerCli, noTrunc bool, image *engine.Env, prefix string))

type HttpApiFunc

type HttpApiFunc func(eng *engine.Engine, version version.Version, w http.ResponseWriter, r *http.Request, vars map[string]string) error

Jump to

Keyboard shortcuts

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