1
0
Fork 0

Upgrade dependencies

This commit is contained in:
Ingo Gottwald 2018-05-23 17:48:04 +02:00 committed by Traefiker Bot
parent d6d795e286
commit 83e09acc9f
177 changed files with 59841 additions and 39358 deletions

View file

@ -16,11 +16,10 @@ package client
import (
"bytes"
"context"
"encoding/json"
"net/http"
"net/url"
"golang.org/x/net/context"
)
type Role struct {

View file

@ -16,12 +16,11 @@ package client
import (
"bytes"
"context"
"encoding/json"
"net/http"
"net/url"
"path"
"golang.org/x/net/context"
)
var (

View file

@ -15,6 +15,7 @@
package client
import (
"context"
"encoding/json"
"errors"
"fmt"
@ -29,8 +30,6 @@ import (
"time"
"github.com/coreos/etcd/version"
"golang.org/x/net/context"
)
var (
@ -671,8 +670,15 @@ func (r *redirectedHTTPAction) HTTPRequest(ep url.URL) *http.Request {
}
func shuffleEndpoints(r *rand.Rand, eps []url.URL) []url.URL {
p := r.Perm(len(eps))
neps := make([]url.URL, len(eps))
// copied from Go 1.9<= rand.Rand.Perm
n := len(eps)
p := make([]int, n)
for i := 0; i < n; i++ {
j := r.Intn(i + 1)
p[i] = p[j]
p[j] = i
}
neps := make([]url.URL, n)
for i, k := range p {
neps[i] = eps[k]
}

View file

@ -19,9 +19,9 @@ Create a Config and exchange it for a Client:
import (
"net/http"
"context"
"github.com/coreos/etcd/client"
"golang.org/x/net/context"
)
cfg := client.Config{
@ -59,7 +59,7 @@ Use a custom context to set timeouts on your operations:
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
// set a new key, ignoring it's previous state
// set a new key, ignoring its previous state
_, err := kAPI.Set(ctx, "/ping", "pong", nil)
if err != nil {
if err == context.DeadlineExceeded {

File diff suppressed because it is too large Load diff

View file

@ -17,6 +17,7 @@ package client
//go:generate codecgen -d 1819 -r "Node|Response|Nodes" -o keys.generated.go keys.go
import (
"context"
"encoding/json"
"errors"
"fmt"
@ -28,7 +29,6 @@ import (
"github.com/coreos/etcd/pkg/pathutil"
"github.com/ugorji/go/codec"
"golang.org/x/net/context"
)
const (
@ -653,8 +653,7 @@ func unmarshalHTTPResponse(code int, header http.Header, body []byte) (res *Resp
default:
err = unmarshalFailedKeysResponse(body)
}
return
return res, err
}
func unmarshalSuccessfulKeysResponse(header http.Header, body []byte) (*Response, error) {

View file

@ -16,14 +16,13 @@ package client
import (
"bytes"
"context"
"encoding/json"
"fmt"
"net/http"
"net/url"
"path"
"golang.org/x/net/context"
"github.com/coreos/etcd/pkg/types"
)
@ -44,7 +43,7 @@ type Member struct {
PeerURLs []string `json:"peerURLs"`
// ClientURLs represents the HTTP(S) endpoints on which this Member
// serves it's client-facing APIs.
// serves its client-facing APIs.
ClientURLs []string `json:"clientURLs"`
}