leasehttp: move lease/http.go to its own pkg

This commit is contained in:
Xiang Li
2016-01-25 06:09:54 +08:00
parent 8905632837
commit 5e2dbadbc0
3 changed files with 10 additions and 8 deletions

View File

@ -24,6 +24,7 @@ import (
"github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/lease"
"github.com/coreos/etcd/lease/leasehttp"
dstorage "github.com/coreos/etcd/storage"
"github.com/coreos/etcd/storage/storagepb"
)
@ -139,7 +140,7 @@ func (s *EtcdServer) LeaseRenew(id lease.LeaseID) (int64, error) {
for _, url := range leader.PeerURLs {
lurl := url + "/leases"
ttl, err = lease.RenewHTTP(id, lurl, s.cfg.PeerTLSInfo, s.cfg.peerDialTimeout())
ttl, err = leasehttp.RenewHTTP(id, lurl, s.cfg.PeerTLSInfo, s.cfg.peerDialTimeout())
if err == nil {
break
}