Merge pull request #69322 from jpbetz/etcd-client-3.3.9

Update etcd client to 3.3 for 1.13

Kubernetes-commit: a8c7a3fd5e707243af68b10a8a581c2c59248222
This commit is contained in:
Kubernetes Publisher 2018-10-10 17:56:46 -07:00
commit 16c6ff8530
8 changed files with 53 additions and 35 deletions

50
Godeps/Godeps.json generated
View File

@ -8,11 +8,11 @@
"Deps": [
{
"ImportPath": "github.com/gogo/protobuf/proto",
"Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7"
"Rev": "342cbe0a04158f6dcb03ca0079991a51a4248c02"
},
{
"ImportPath": "github.com/gogo/protobuf/sortkeys",
"Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7"
"Rev": "342cbe0a04158f6dcb03ca0079991a51a4248c02"
},
{
"ImportPath": "github.com/golang/glog",
@ -60,95 +60,95 @@
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/config",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/config/v1alpha1",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/naming",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
}
]
}

View File

@ -10,5 +10,6 @@
# Please keep the list sorted.
Sendgrid, Inc
Vastech SA (PTY) LTD
Walter Schulze <awalterschulze@gmail.com>

View File

@ -1,4 +1,5 @@
Anton Povarov <anton.povarov@gmail.com>
Brian Goff <cpuguy83@gmail.com>
Clayton Coleman <ccoleman@redhat.com>
Denis Smirnov <denis.smirnov.91@gmail.com>
DongYun Kang <ceram1000@gmail.com>
@ -10,9 +11,12 @@ John Shahid <jvshahid@gmail.com>
John Tuley <john@tuley.org>
Laurent <laurent@adyoulike.com>
Patrick Lee <patrick@dropbox.com>
Roger Johansson <rogeralsing@gmail.com>
Sam Nguyen <sam.nguyen@sendgrid.com>
Sergio Arbeo <serabe@gmail.com>
Stephen J Day <stephen.day@docker.com>
Tamir Duberstein <tamird@gmail.com>
Todd Eisenberger <teisenberger@dropbox.com>
Tormod Erevik Lea <tormodlea@gmail.com>
Vyacheslav Kim <kane@sendgrid.com>
Walter Schulze <awalterschulze@gmail.com>

View File

@ -174,11 +174,11 @@ func sizeFixed32(x uint64) int {
// This is the format used for the sint64 protocol buffer type.
func (p *Buffer) EncodeZigzag64(x uint64) error {
// use signed number to get arithmetic right shift.
return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63))))
return p.EncodeVarint((x << 1) ^ uint64((int64(x) >> 63)))
}
func sizeZigzag64(x uint64) int {
return sizeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63))))
return sizeVarint((x << 1) ^ uint64((int64(x) >> 63)))
}
// EncodeZigzag32 writes a zigzag-encoded 32-bit integer

View File

@ -73,7 +73,6 @@ for a protocol buffer variable v:
When the .proto file specifies `syntax="proto3"`, there are some differences:
- Non-repeated fields of non-message type are values instead of pointers.
- Getters are only generated for message and oneof fields.
- Enum types do not get an Enum method.
The simplest way to describe this is to see an example.

View File

@ -193,6 +193,7 @@ type Properties struct {
Default string // default value
HasDefault bool // whether an explicit default was provided
CustomType string
CastType string
StdTime bool
StdDuration bool
@ -341,6 +342,8 @@ func (p *Properties) Parse(s string) {
p.OrigName = strings.Split(f, "=")[1]
case strings.HasPrefix(f, "customtype="):
p.CustomType = strings.Split(f, "=")[1]
case strings.HasPrefix(f, "casttype="):
p.CastType = strings.Split(f, "=")[1]
case f == "stdtime":
p.StdTime = true
case f == "stdduration":

View File

@ -522,6 +522,17 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert
}
return nil
}
} else if len(props.CastType) > 0 {
if _, ok := v.Interface().(interface {
String() string
}); ok {
switch v.Kind() {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
_, err := fmt.Fprintf(w, "%d", v.Interface())
return err
}
}
} else if props.StdTime {
t, ok := v.Interface().(time.Time)
if !ok {
@ -531,9 +542,9 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert
if err != nil {
return err
}
props.StdTime = false
err = tm.writeAny(w, reflect.ValueOf(tproto), props)
props.StdTime = true
propsCopy := *props // Make a copy so that this is goroutine-safe
propsCopy.StdTime = false
err = tm.writeAny(w, reflect.ValueOf(tproto), &propsCopy)
return err
} else if props.StdDuration {
d, ok := v.Interface().(time.Duration)
@ -541,9 +552,9 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert
return fmt.Errorf("stdtime is not time.Duration, but %T", v.Interface())
}
dproto := durationProto(d)
props.StdDuration = false
err := tm.writeAny(w, reflect.ValueOf(dproto), props)
props.StdDuration = true
propsCopy := *props // Make a copy so that this is goroutine-safe
propsCopy.StdDuration = false
err := tm.writeAny(w, reflect.ValueOf(dproto), &propsCopy)
return err
}
}

View File

@ -983,7 +983,7 @@ func (p *textParser) readAny(v reflect.Value, props *Properties) error {
return p.readStruct(fv, terminator)
case reflect.Uint32:
if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {
fv.SetUint(uint64(x))
fv.SetUint(x)
return nil
}
case reflect.Uint64: