1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/api/container.go
Solomon Hykes 44e10433c7 api/container.go: an API-specific representation of a container
This breaks the dependency from the remote API implementation to the
internal representation of a container. Instead it uses its own partial
representation of a container, with only required fields.

* This preserves reverse-compatibility with all past implementations of the remote API.

* This clarifies which fields are guaranteed to be present in a response
	A docker remote api server *may* return more fields in a Container
	object, but their presence and semantics are not guaranteed and should
	not be relied upon by client implementations.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-15 23:24:51 +00:00

18 lines
291 B
Go

package api
import (
"github.com/dotcloud/docker/nat"
"github.com/dotcloud/docker/runconfig"
)
type Container struct {
Config runconfig.Config
HostConfig runconfig.HostConfig
State struct {
Running bool
ExitCode int
}
NetworkSettings struct {
Ports nat.PortMap
}
}