defaults: add package to contain server defaults

To reduce the binary size of containerd, we no longer import the
`server` package for only a few defaults. This reduces the size of `ctr`
by 2MB. There are probably other gains elsewhere.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day
2017-11-02 13:59:34 -07:00
parent 564600ee79
commit 0a1a13448b
5 changed files with 25 additions and 21 deletions

View File

@@ -17,8 +17,8 @@ import (
"github.com/containerd/containerd/cmd/ctr/commands/snapshot"
"github.com/containerd/containerd/cmd/ctr/commands/tasks"
versionCmd "github.com/containerd/containerd/cmd/ctr/commands/version"
"github.com/containerd/containerd/defaults"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/server"
"github.com/containerd/containerd/version"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
@@ -57,7 +57,7 @@ containerd CLI
cli.StringFlag{
Name: "address, a",
Usage: "address for containerd's GRPC server",
Value: server.DefaultAddress,
Value: defaults.DefaultAddress,
},
cli.DurationFlag{
Name: "timeout",