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:
commit
93e49a87bb
|
|
@ -8,11 +8,11 @@
|
||||||
"Deps": [
|
"Deps": [
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gogo/protobuf/proto",
|
"ImportPath": "github.com/gogo/protobuf/proto",
|
||||||
"Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7"
|
"Rev": "342cbe0a04158f6dcb03ca0079991a51a4248c02"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gogo/protobuf/sortkeys",
|
"ImportPath": "github.com/gogo/protobuf/sortkeys",
|
||||||
"Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7"
|
"Rev": "342cbe0a04158f6dcb03ca0079991a51a4248c02"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/golang/glog",
|
"ImportPath": "github.com/golang/glog",
|
||||||
|
|
@ -60,103 +60,103 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/config",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/config",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/config/v1alpha1",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/config/v1alpha1",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
|
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
|
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/fields",
|
"ImportPath": "k8s.io/apimachinery/pkg/fields",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/labels",
|
"ImportPath": "k8s.io/apimachinery/pkg/labels",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/selection",
|
"ImportPath": "k8s.io/apimachinery/pkg/selection",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/types",
|
"ImportPath": "k8s.io/apimachinery/pkg/types",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/naming",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/naming",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/watch",
|
"ImportPath": "k8s.io/apimachinery/pkg/watch",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
|
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
|
||||||
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
|
"Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apiserver/pkg/apis/config",
|
"ImportPath": "k8s.io/apiserver/pkg/apis/config",
|
||||||
"Rev": "75a03c2d437ac87229cdc1d43c039a4e7bf7ecf5"
|
"Rev": "a24d90ceffd04e673b14cbdab1a019af01a13892"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apiserver/pkg/apis/config/v1alpha1",
|
"ImportPath": "k8s.io/apiserver/pkg/apis/config/v1alpha1",
|
||||||
"Rev": "75a03c2d437ac87229cdc1d43c039a4e7bf7ecf5"
|
"Rev": "a24d90ceffd04e673b14cbdab1a019af01a13892"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/utils/pointer",
|
"ImportPath": "k8s.io/utils/pointer",
|
||||||
|
|
|
||||||
|
|
@ -10,5 +10,6 @@
|
||||||
|
|
||||||
# Please keep the list sorted.
|
# Please keep the list sorted.
|
||||||
|
|
||||||
|
Sendgrid, Inc
|
||||||
Vastech SA (PTY) LTD
|
Vastech SA (PTY) LTD
|
||||||
Walter Schulze <awalterschulze@gmail.com>
|
Walter Schulze <awalterschulze@gmail.com>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
Anton Povarov <anton.povarov@gmail.com>
|
Anton Povarov <anton.povarov@gmail.com>
|
||||||
|
Brian Goff <cpuguy83@gmail.com>
|
||||||
Clayton Coleman <ccoleman@redhat.com>
|
Clayton Coleman <ccoleman@redhat.com>
|
||||||
Denis Smirnov <denis.smirnov.91@gmail.com>
|
Denis Smirnov <denis.smirnov.91@gmail.com>
|
||||||
DongYun Kang <ceram1000@gmail.com>
|
DongYun Kang <ceram1000@gmail.com>
|
||||||
|
|
@ -10,9 +11,12 @@ John Shahid <jvshahid@gmail.com>
|
||||||
John Tuley <john@tuley.org>
|
John Tuley <john@tuley.org>
|
||||||
Laurent <laurent@adyoulike.com>
|
Laurent <laurent@adyoulike.com>
|
||||||
Patrick Lee <patrick@dropbox.com>
|
Patrick Lee <patrick@dropbox.com>
|
||||||
|
Roger Johansson <rogeralsing@gmail.com>
|
||||||
|
Sam Nguyen <sam.nguyen@sendgrid.com>
|
||||||
Sergio Arbeo <serabe@gmail.com>
|
Sergio Arbeo <serabe@gmail.com>
|
||||||
Stephen J Day <stephen.day@docker.com>
|
Stephen J Day <stephen.day@docker.com>
|
||||||
Tamir Duberstein <tamird@gmail.com>
|
Tamir Duberstein <tamird@gmail.com>
|
||||||
Todd Eisenberger <teisenberger@dropbox.com>
|
Todd Eisenberger <teisenberger@dropbox.com>
|
||||||
Tormod Erevik Lea <tormodlea@gmail.com>
|
Tormod Erevik Lea <tormodlea@gmail.com>
|
||||||
|
Vyacheslav Kim <kane@sendgrid.com>
|
||||||
Walter Schulze <awalterschulze@gmail.com>
|
Walter Schulze <awalterschulze@gmail.com>
|
||||||
|
|
|
||||||
|
|
@ -174,11 +174,11 @@ func sizeFixed32(x uint64) int {
|
||||||
// This is the format used for the sint64 protocol buffer type.
|
// This is the format used for the sint64 protocol buffer type.
|
||||||
func (p *Buffer) EncodeZigzag64(x uint64) error {
|
func (p *Buffer) EncodeZigzag64(x uint64) error {
|
||||||
// use signed number to get arithmetic right shift.
|
// 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 {
|
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
|
// EncodeZigzag32 writes a zigzag-encoded 32-bit integer
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,6 @@ for a protocol buffer variable v:
|
||||||
When the .proto file specifies `syntax="proto3"`, there are some differences:
|
When the .proto file specifies `syntax="proto3"`, there are some differences:
|
||||||
|
|
||||||
- Non-repeated fields of non-message type are values instead of pointers.
|
- 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.
|
- Enum types do not get an Enum method.
|
||||||
|
|
||||||
The simplest way to describe this is to see an example.
|
The simplest way to describe this is to see an example.
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,7 @@ type Properties struct {
|
||||||
Default string // default value
|
Default string // default value
|
||||||
HasDefault bool // whether an explicit default was provided
|
HasDefault bool // whether an explicit default was provided
|
||||||
CustomType string
|
CustomType string
|
||||||
|
CastType string
|
||||||
StdTime bool
|
StdTime bool
|
||||||
StdDuration bool
|
StdDuration bool
|
||||||
|
|
||||||
|
|
@ -341,6 +342,8 @@ func (p *Properties) Parse(s string) {
|
||||||
p.OrigName = strings.Split(f, "=")[1]
|
p.OrigName = strings.Split(f, "=")[1]
|
||||||
case strings.HasPrefix(f, "customtype="):
|
case strings.HasPrefix(f, "customtype="):
|
||||||
p.CustomType = strings.Split(f, "=")[1]
|
p.CustomType = strings.Split(f, "=")[1]
|
||||||
|
case strings.HasPrefix(f, "casttype="):
|
||||||
|
p.CastType = strings.Split(f, "=")[1]
|
||||||
case f == "stdtime":
|
case f == "stdtime":
|
||||||
p.StdTime = true
|
p.StdTime = true
|
||||||
case f == "stdduration":
|
case f == "stdduration":
|
||||||
|
|
|
||||||
|
|
@ -522,6 +522,17 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert
|
||||||
}
|
}
|
||||||
return nil
|
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 {
|
} else if props.StdTime {
|
||||||
t, ok := v.Interface().(time.Time)
|
t, ok := v.Interface().(time.Time)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
@ -531,9 +542,9 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
props.StdTime = false
|
propsCopy := *props // Make a copy so that this is goroutine-safe
|
||||||
err = tm.writeAny(w, reflect.ValueOf(tproto), props)
|
propsCopy.StdTime = false
|
||||||
props.StdTime = true
|
err = tm.writeAny(w, reflect.ValueOf(tproto), &propsCopy)
|
||||||
return err
|
return err
|
||||||
} else if props.StdDuration {
|
} else if props.StdDuration {
|
||||||
d, ok := v.Interface().(time.Duration)
|
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())
|
return fmt.Errorf("stdtime is not time.Duration, but %T", v.Interface())
|
||||||
}
|
}
|
||||||
dproto := durationProto(d)
|
dproto := durationProto(d)
|
||||||
props.StdDuration = false
|
propsCopy := *props // Make a copy so that this is goroutine-safe
|
||||||
err := tm.writeAny(w, reflect.ValueOf(dproto), props)
|
propsCopy.StdDuration = false
|
||||||
props.StdDuration = true
|
err := tm.writeAny(w, reflect.ValueOf(dproto), &propsCopy)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -983,7 +983,7 @@ func (p *textParser) readAny(v reflect.Value, props *Properties) error {
|
||||||
return p.readStruct(fv, terminator)
|
return p.readStruct(fv, terminator)
|
||||||
case reflect.Uint32:
|
case reflect.Uint32:
|
||||||
if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {
|
if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {
|
||||||
fv.SetUint(uint64(x))
|
fv.SetUint(x)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
case reflect.Uint64:
|
case reflect.Uint64:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue