1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

10 commits

Author SHA1 Message Date
Vincent Demeester
be1df1ee13
Extract the daemon image cache to its own package
ImageCache is now independent of `Daemon` and is located in
`image/cache` package.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-03 19:19:27 +01:00
Michael Crosby
91e197d614 Add engine-api types to docker
This moves the types for the `engine-api` repo to the existing types
package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-09-07 11:05:58 -07:00
Qiang Huang
53b0d62683 Vendor engine-api to 70d266e96080e3c3d63c55a4d8659e00ac1f7e6c
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-02-29 19:28:37 +08:00
David Calavera
907407d0b2 Modify import paths to point to the new engine-api package.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-06 19:48:59 -05:00
David Calavera
7ac4232e70 Move Config and HostConfig from runconfig to types/container.
- Make the API client library completely standalone.
- Move windows partition isolation detection to the client, so the
  driver doesn't use external types.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:34:30 -05:00
David Calavera
056e744903 Replace usage of pkg/nat with go-connections/nat.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:31:46 -05:00
David Calavera
f9b857a200 Move StrSlice to types.
This is a very docker concept that nobody elses need.
We only maintain it to keep the API backwards compatible.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:31:43 -05:00
Shijiang Wei
ea4a06740b abstract the string slice struct to stringutils package
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-08-29 01:08:40 +08:00
Doug Davis
12b6083c8f Remove panic in nat package on invalid hostport
Closes #14621

This one grew to be much more than I expected so here's the story... :-)
- when a bad port string (e.g. xxx80) is passed into container.create()
  via the API it wasn't being checked until we tried to start the container.
- While starting the container we trid to parse 'xxx80' in nat.Int()
  and would panic on the strconv.ParseUint().  We should (almost) never panic.
- In trying to remove the panic I decided to make it so that we, instead,
  checked the string during the NewPort() constructor.  This means that
  I had to change all casts from 'string' to 'Port' to use NewPort() instead.
  Which is a good thing anyway, people shouldn't assume they know the
  internal format of types like that, in general.
- This meant I had to go and add error checks on all calls to NewPort().
  To avoid changing the testcases too much I create newPortNoError() **JUST**
  for the testcase uses where we know the port string is ok.
- After all of that I then went back and added a check during container.create()
  to check the port string so we'll report the error as soon as we get the
  data.
- If, somehow, the bad string does get into the metadata we will generate
  an error during container.start() but I can't test for that because
  the container.create() catches it now.  But I did add a testcase for that.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-07-17 13:02:54 -07:00
Vincent Demeester
d4aec5f0a6 Refactor test and add coverage to runconfig
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-01 10:16:36 +02:00