Documentation ¶
Index ¶
- Constants
- Variables
- func AcceptConnections(job *engine.Job) engine.Status
- func AttachProfiler(router *mux.Router)
- func ListenAndServe(proto, addr string, eng *engine.Engine, logging, enableCors bool, ...) error
- func MatchesContentType(contentType, expectedType string) bool
- func ParseCommands(proto, addr string, args ...string) error
- func ServeApi(job *engine.Job) engine.Status
- func ServeFd(addr string, handle http.Handler) error
- func ServeRequest(eng *engine.Engine, apiversion float64, w http.ResponseWriter, ...) error
- func ValidateHost(val string) (string, error)
- type Container
- type DockerCli
- func (cli *DockerCli) CmdAttach(args ...string) error
- func (cli *DockerCli) CmdBuild(args ...string) error
- func (cli *DockerCli) CmdCommit(args ...string) error
- func (cli *DockerCli) CmdCp(args ...string) error
- func (cli *DockerCli) CmdDiff(args ...string) error
- func (cli *DockerCli) CmdEvents(args ...string) error
- func (cli *DockerCli) CmdExport(args ...string) error
- func (cli *DockerCli) CmdHelp(args ...string) error
- func (cli *DockerCli) CmdHistory(args ...string) error
- func (cli *DockerCli) CmdImages(args ...string) error
- func (cli *DockerCli) CmdImport(args ...string) error
- func (cli *DockerCli) CmdInfo(args ...string) error
- func (cli *DockerCli) CmdInsert(args ...string) error
- func (cli *DockerCli) CmdInspect(args ...string) error
- func (cli *DockerCli) CmdKill(args ...string) error
- func (cli *DockerCli) CmdLoad(args ...string) error
- func (cli *DockerCli) CmdLogin(args ...string) error
- func (cli *DockerCli) CmdLogs(args ...string) error
- func (cli *DockerCli) CmdPort(args ...string) error
- func (cli *DockerCli) CmdPs(args ...string) error
- func (cli *DockerCli) CmdPull(args ...string) error
- func (cli *DockerCli) CmdPush(args ...string) error
- func (cli *DockerCli) CmdRestart(args ...string) error
- func (cli *DockerCli) CmdRm(args ...string) error
- func (cli *DockerCli) CmdRmi(args ...string) error
- func (cli *DockerCli) CmdRun(args ...string) error
- func (cli *DockerCli) CmdSave(args ...string) error
- func (cli *DockerCli) CmdSearch(args ...string) error
- func (cli *DockerCli) CmdStart(args ...string) error
- func (cli *DockerCli) CmdStop(args ...string) error
- func (cli *DockerCli) CmdTag(args ...string) error
- func (cli *DockerCli) CmdTop(args ...string) error
- func (cli *DockerCli) CmdVersion(args ...string) error
- func (cli *DockerCli) CmdWait(args ...string) error
- func (cli *DockerCli) LoadConfigFile() (err error)
- func (cli *DockerCli) Subcmd(name, signature, description string) *flag.FlagSet
- func (cli *DockerCli) WalkTree(noTrunc bool, images *engine.Table, byParent map[string]*engine.Table, ...)
- type HttpApiFunc
Constants ¶
const ( APIVERSION = 1.9 DEFAULTHTTPHOST = "127.0.0.1" DEFAULTUNIXSOCKET = "/var/run/docker.sock" )
FIXME: move code common to client and server to common.go
Variables ¶
var (
ErrConnectionRefused = errors.New("Can't connect to docker daemon. Is 'docker -d' running on this host?")
)
Functions ¶
func AttachProfiler ¶
func ListenAndServe ¶
func ListenAndServe(proto, addr string, eng *engine.Engine, logging, enableCors bool, dockerVersion 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 ParseCommands ¶ added in v0.8.1
func ServeApi ¶
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 ¶
ServeFD creates an http.Server and sets it up to serve given a socket activated argument.
func ServeRequest ¶
func ServeRequest(eng *engine.Engine, apiversion float64, 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
Types ¶
type DockerCli ¶ added in v0.8.1
type DockerCli struct {
// contains filtered or unexported fields
}
func NewDockerCli ¶ added in v0.8.1
func (*DockerCli) CmdHistory ¶ added in v0.8.1
func (*DockerCli) CmdInspect ¶ added in v0.8.1
func (*DockerCli) CmdLogin ¶ added in v0.8.1
'docker login': login / register a user to registry service.
func (*DockerCli) CmdRestart ¶ added in v0.8.1
func (*DockerCli) CmdRmi ¶ added in v0.8.1
'docker rmi IMAGE' removes all images with the name IMAGE
func (*DockerCli) CmdVersion ¶ added in v0.8.1
'docker version': show version information