Closed pomnb closed 1 year ago
Anything but a locally running instance of Qdrant uses TLS, so you can't use an insecure channel, and you also need to provide your api-key
as metadata in gRPC requests:
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
md := metadata.New(map[string]string{"api-key": "secret-key-*******"})
ctx = metadata.NewOutgoingContext(ctx, md)
Check out the "authenticated" example in this repo: https://github.com/qdrant/go-client/blob/master/examples/authentication/main.go
i meet this err when list collection : connection closed before server preface received , use go-client@v1.2.0 grpc v1.47.0 protobuf v1.28.0 below is the code