Skip to content

Commit

Permalink
embed: use new "credentials" package
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
  • Loading branch information
gyuho committed Jul 25, 2019
1 parent 88d2c09 commit f5f29a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions embed/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"net/http"
"strings"

"go.etcd.io/etcd/clientv3/credentials"
"go.etcd.io/etcd/etcdserver"
"go.etcd.io/etcd/etcdserver/api/v3client"
"go.etcd.io/etcd/etcdserver/api/v3election"
Expand All @@ -43,7 +44,6 @@ import (
"go.uber.org/zap"
"golang.org/x/net/trace"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
)

type serveCtx struct {
Expand Down Expand Up @@ -163,8 +163,8 @@ func (sctx *serveCtx) serve(
dtls := tlscfg.Clone()
// trust local server
dtls.InsecureSkipVerify = true
creds := credentials.NewTLS(dtls)
opts := []grpc.DialOption{grpc.WithTransportCredentials(creds)}
bundle := credentials.NewBundle(credentials.Config{TLSConfig: dtls})
opts := []grpc.DialOption{grpc.WithTransportCredentials(bundle.TransportCredentials())}
gwmux, err = sctx.registerGateway(opts)
if err != nil {
return err
Expand Down

0 comments on commit f5f29a5

Please sign in to comment.