etcd-test-proxy: use "proxy.Server"

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
release-3.4
Gyuho Lee 2018-04-05 10:55:13 -07:00
parent 9d3809646a
commit 4d1f60bb21
1 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ import (
"syscall"
"time"
"github.com/coreos/etcd/pkg/transport"
"github.com/coreos/etcd/pkg/proxy"
"go.uber.org/zap"
)
@ -69,14 +69,14 @@ $ ETCDCTL_API=3 ./bin/etcdctl --endpoints localhost:23790 put foo bar`)
flag.Parse()
cfg := transport.ProxyConfig{
cfg := proxy.ServerConfig{
From: url.URL{Scheme: "tcp", Host: from},
To: url.URL{Scheme: "tcp", Host: to},
}
if verbose {
cfg.Logger = zap.NewExample()
}
p := transport.NewProxy(cfg)
p := proxy.NewServer(cfg)
<-p.Ready()
defer p.Close()