Use protoversion for containerd version

Signed-off-by: Peter Edge <peter.edge@gmail.com>
This commit is contained in:
Peter Edge 2015-12-18 13:06:04 +00:00
parent 1d63236c27
commit d2e319523d
5 changed files with 48 additions and 4 deletions

View file

@ -23,6 +23,10 @@ import (
// TODO: parse flags and pass opts
func getClient(ctx *cli.Context) types.APIClient {
return types.NewAPIClient(getClientConn(ctx))
}
func getClientConn(ctx *cli.Context) *grpc.ClientConn {
dialOpts := []grpc.DialOption{grpc.WithInsecure()}
dialOpts = append(dialOpts,
grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) {
@ -33,7 +37,7 @@ func getClient(ctx *cli.Context) types.APIClient {
if err != nil {
fatal(err.Error(), 1)
}
return types.NewAPIClient(conn)
return conn
}
var ContainersCommand = cli.Command{