Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit d1876c1

Browse files
authored
Merge pull request #318 from vdemeester/update-vendoring
Update vendoring
2 parents 25cf8a9 + 28c2e21 commit d1876c1

File tree

176 files changed

+6982
-766
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+6982
-766
lines changed

docker/builder/builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type Builder interface {
3434

3535
// DaemonBuilder is the daemon "docker build" Builder implementation.
3636
type DaemonBuilder struct {
37-
Client client.APIClient
37+
Client client.ImageAPIClient
3838
ContextDirectory string
3939
Dockerfile string
4040
AuthConfigs map[string]types.AuthConfig

docker/container.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ func (c *Container) CreateWithOverride(ctx context.Context, imageName string, co
199199
// Stop stops the container.
200200
func (c *Container) Stop(ctx context.Context, timeout int) error {
201201
return c.withContainer(ctx, func(container *types.ContainerJSON) error {
202-
return c.client.ContainerStop(ctx, container.ID, time.Duration(timeout)*time.Second)
202+
timeoutDuration := time.Duration(timeout) * time.Second
203+
return c.client.ContainerStop(ctx, container.ID, &timeoutDuration)
203204
})
204205
}
205206

@@ -632,7 +633,8 @@ func (c *Container) Restart(ctx context.Context, timeout int) error {
632633
return err
633634
}
634635

635-
return c.client.ContainerRestart(ctx, container.ID, time.Duration(timeout)*time.Second)
636+
timeoutDuration := time.Duration(timeout) * time.Second
637+
return c.client.ContainerRestart(ctx, container.ID, &timeoutDuration)
636638
}
637639

638640
// Log forwards container logs to the project configured logger.

docker/name.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func NewSingleNamer(name string) Namer {
3737

3838
// NewNamer returns a namer that returns names based on the specified project and
3939
// service name and an inner counter, e.g. project_service_1, project_service_2…
40-
func NewNamer(ctx context.Context, client client.APIClient, project, service string, oneOff bool) (Namer, error) {
40+
func NewNamer(ctx context.Context, client client.ContainerAPIClient, project, service string, oneOff bool) (Namer, error) {
4141
namer := &defaultNamer{
4242
project: project,
4343
service: service,

docker/network/network.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616

1717
// Network holds attributes and method for a network definition in compose
1818
type Network struct {
19-
client client.APIClient
19+
client client.NetworkAPIClient
2020
name string
2121
projectName string
2222
driver string
@@ -98,7 +98,7 @@ func convertToAPIIpam(ipam config.Ipam) network.IPAM {
9898
}
9999

100100
// NewNetwork creates a new network from the specified name and config.
101-
func NewNetwork(projectName, name string, config *config.NetworkConfig, client client.APIClient) *Network {
101+
func NewNetwork(projectName, name string, config *config.NetworkConfig, client client.NetworkAPIClient) *Network {
102102
networkName := name
103103
if config.External.External {
104104
networkName = config.External.Name
@@ -151,7 +151,7 @@ func (n *Networks) Remove(ctx context.Context) error {
151151
// NetworksFromServices creates a new Networks struct based on networks configurations and
152152
// services configuration. If a network is defined but not used by any service, it will return
153153
// an error along the Networks.
154-
func NetworksFromServices(cli client.APIClient, projectName string, networkConfigs map[string]*config.NetworkConfig, services *config.ServiceConfigs, networkEnabled bool) (*Networks, error) {
154+
func NetworksFromServices(cli client.NetworkAPIClient, projectName string, networkConfigs map[string]*config.NetworkConfig, services *config.ServiceConfigs, networkEnabled bool) (*Networks, error) {
155155
var err error
156156
networks := make([]*Network, 0, len(networkConfigs))
157157
networkNames := map[string]*yaml.Network{}

docker/service_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package docker
22

33
import (
4+
"testing"
5+
46
"github.com/docker/libcompose/config"
57
"github.com/stretchr/testify/assert"
6-
"testing"
78
)
89

910
func TestSpecifiesHostPort(t *testing.T) {

script/vendor.sh

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,28 @@ cd "$(dirname "$BASH_SOURCE")/.."
55
rm -rf vendor/
66
source 'script/.vendor-helpers.sh'
77

8-
clone git github.com/Sirupsen/logrus v0.9.0
8+
clone git github.com/Sirupsen/logrus v0.10.0
99
#clone git github.com/codegangsta/cli 6086d7927ec35315964d9fea46df6c04e6d697c1
1010
clone git github.com/codegangsta/cli 839f07bfe4819fa1434fa907d0804ce6ec45a5df
11-
clone git github.com/docker/distribution 467fc068d88aa6610691b7f1a677271a3fac4aac
11+
clone git github.com/docker/distribution 5bbf65499960b184fe8e0f045397375e1a6722b8
1212
clone git github.com/vbatts/tar-split v0.9.11
13-
clone git github.com/docker/docker 9837ec4da53f15f9120d53a6e1517491ba8b0261
14-
clone git github.com/docker/go-units 651fc226e7441360384da338d0fd37f2440ffbe3
15-
clone git github.com/docker/go-connections v0.2.0
16-
clone git github.com/docker/engine-api d06b85b29e37346a050f335042e16e6e8a9f49da
17-
clone git github.com/vdemeester/docker-events b308d2e8d639d928c882913bcb4f85b3a84c7a07
13+
clone git github.com/docker/docker 534753663161334baba06f13b8efa4cad22b5bc5
14+
clone git github.com/docker/go-units f2d77a61e3c169b43402a0a1e84f06daf29b8190
15+
# clone git github.com/docker/go-units 651fc226e7441360384da338d0fd37f2440ffbe3
16+
clone git github.com/docker/go-connections 990a1a1a70b0da4c4cb70e117971a4f0babfbf1a
17+
# clone git github.com/docker/go-connections fa2850ff103453a9ad190da0df0af134f0314b3d
18+
clone git github.com/docker/engine-api 62043eb79d581a32ea849645277023c550732e52
19+
clone git github.com/vdemeester/docker-events be74d4929ec1ad118df54349fda4b0cba60f849b
1820
clone git github.com/flynn/go-shlex 3f9db97f856818214da2e1057f8ad84803971cff
1921
clone git github.com/gorilla/context 14f550f51a
2022
clone git github.com/gorilla/mux e444e69cbd
21-
clone git github.com/opencontainers/runc 2441732d6fcc0fb0a542671a4372e0c7bc99c19e
23+
clone git github.com/opencontainers/runc cc29e3dded8e27ba8f65738f40d251c885030a28
2224
clone git github.com/stretchr/testify a1f97990ddc16022ec7610326dd9bce31332c116
2325
clone git github.com/davecgh/go-spew 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d
2426
clone git github.com/pmezard/go-difflib d8ed2627bdf02c080bf22230dbb337003b7aba2d
25-
clone git golang.org/x/crypto 4d48e5fa3d62b5e6e71260571bf76c767198ca02 https://github.com/golang/crypto.git
26-
clone git golang.org/x/net 47990a1ba55743e6ef1affd3a14e5bac8553615d https://github.com/golang/net.git
27+
clone git golang.org/x/crypto 3fbbcd23f1cb824e69491a5930cfeff09b12f4d2 https://github.com/golang/crypto.git
28+
clone git golang.org/x/net 2beffdc2e92c8a3027590f898fe88f69af48a3f8 https://github.com/tonistiigi/net.git
29+
# clone git golang.org/x/net 47990a1ba55743e6ef1affd3a14e5bac8553615d https://github.com/golang/net.git
2730
clone git gopkg.in/check.v1 11d3bc7aa68e238947792f30573146a3231fc0f1
2831
clone git github.com/cloudfoundry-incubator/candiedyaml 5cef21e2e4f0fd147973b558d4db7395176bcd95
2932
clone git github.com/Azure/go-ansiterm 388960b655244e76e24c75f48631564eaefade62
@@ -33,4 +36,6 @@ clone git github.com/xeipuuv/gojsonreference e02fc20de94c78484cd5ffb007f8af96be0
3336
clone git github.com/xeipuuv/gojsonschema ac452913faa25c08bb78810d3e6f88b8a39f8f25
3437
clone git github.com/kr/pty 5cf931ef8f
3538

39+
clone git github.com/spf13/pflag cb88ea77998c3f024757528e3305022ab50b43be
40+
3641
clean && mv vendor/src/* vendor

test/nop.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ import (
1818
var (
1919
errNoEngine = errors.New("Engine no longer exists")
2020

21-
// Make sure NopClient implements APIClient
22-
_ client.APIClient = &NopClient{}
21+
// Make sure NopClient implements ContainerAPIclient and other required interface
22+
_ client.ContainerAPIClient = (*NopClient)(nil)
23+
_ client.ImageAPIClient = (*NopClient)(nil)
24+
_ client.NetworkAPIClient = (*NopClient)(nil)
25+
_ client.VolumeAPIClient = (*NopClient)(nil)
26+
_ client.SystemAPIClient = (*NopClient)(nil)
2327
)
2428

2529
// NopClient is a nop API Client based on engine-api
@@ -147,7 +151,7 @@ func (client *NopClient) ContainerResize(ctx context.Context, container string,
147151
}
148152

149153
// ContainerRestart stops and starts a container again
150-
func (client *NopClient) ContainerRestart(ctx context.Context, container string, timeout time.Duration) error {
154+
func (client *NopClient) ContainerRestart(ctx context.Context, container string, timeout *time.Duration) error {
151155
return errNoEngine
152156
}
153157

@@ -167,7 +171,7 @@ func (client *NopClient) ContainerStart(ctx context.Context, container string, o
167171
}
168172

169173
// ContainerStop stops a container without terminating the process
170-
func (client *NopClient) ContainerStop(ctx context.Context, container string, timeout time.Duration) error {
174+
func (client *NopClient) ContainerStop(ctx context.Context, container string, timeout *time.Duration) error {
171175
return errNoEngine
172176
}
173177

vendor/github.com/Sirupsen/logrus/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/Sirupsen/logrus/README.md

Lines changed: 26 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/Sirupsen/logrus/entry.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)