Skip to content

gRPC vendoring  #1505

@sevki

Description

@sevki

cannot use gRPC package when a vendored version exists in containerd. Here is a quick way to reproduce the problem

package main

import (
	"flag"
	"log"

	"google.golang.org/grpc"

	"github.com/containerd/containerd"
)

var (
	serverAddr = flag.String("addr", "127.0.0.1:1338", "The server address in the format of host:port")
)

func main() {
	gopts := []grpc.DialOption{
		grpc.WithInsecure(),
	}

	conn, err := grpc.Dial(*serverAddr, gopts...)
	client, err := containerd.NewWithConn(conn)
	if err != nil {
		log.Fatalf("can't connect to containerd: %v\n", err)
	}
}

can't compile because

./main.go:22:39: cannot use conn (type *"google.golang.org/grpc".ClientConn) as type *"github.com/containerd/containerd/vendor/google.golang.org/grpc".ClientConn in argument to containerd.NewWithConn

similar issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions