Update the kubernetes api to latest
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
f5f2ff63b2
commit
303a3929b2
56 changed files with 6885 additions and 2610 deletions
14
vendor/google.golang.org/grpc/metadata/metadata.go
generated
vendored
14
vendor/google.golang.org/grpc/metadata/metadata.go
generated
vendored
|
@ -60,15 +60,21 @@ func encodeKeyValue(k, v string) (string, string) {
|
|||
|
||||
// DecodeKeyValue returns the original key and value corresponding to the
|
||||
// encoded data in k, v.
|
||||
// If k is a binary header and v contains comma, v is split on comma before decoded,
|
||||
// and the decoded v will be joined with comma before returned.
|
||||
func DecodeKeyValue(k, v string) (string, string, error) {
|
||||
if !strings.HasSuffix(k, binHdrSuffix) {
|
||||
return k, v, nil
|
||||
}
|
||||
val, err := base64.StdEncoding.DecodeString(v)
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
vvs := strings.Split(v, ",")
|
||||
for i, vv := range vvs {
|
||||
val, err := base64.StdEncoding.DecodeString(vv)
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
vvs[i] = string(val)
|
||||
}
|
||||
return k, string(val), nil
|
||||
return k, strings.Join(vvs, ","), nil
|
||||
}
|
||||
|
||||
// MD is a mapping from metadata keys to values. Users should use the following
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue