summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/apimachinery/pkg/api
diff options
context:
space:
mode:
authorSascha Grunert <sgrunert@suse.com>2019-09-05 16:58:06 +0200
committerSascha Grunert <sgrunert@suse.com>2019-09-05 16:58:08 +0200
commitf66a2069f1b26ff9987b008ba4b0c91ac3b682cc (patch)
tree1219ee0e7b87494eaf2c6ace56d4ecada0dc4a39 /vendor/k8s.io/apimachinery/pkg/api
parentb962b1e3538312f145aea0cf5546ae31f35f635f (diff)
downloadpodman-f66a2069f1b26ff9987b008ba4b0c91ac3b682cc.tar.gz
podman-f66a2069f1b26ff9987b008ba4b0c91ac3b682cc.tar.bz2
podman-f66a2069f1b26ff9987b008ba4b0c91ac3b682cc.zip
Update buildah to v1.11.0
Vendor in the latest changes for buildah to apply the implemented features here as well. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Diffstat (limited to 'vendor/k8s.io/apimachinery/pkg/api')
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go46
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go4
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go34
3 files changed, 52 insertions, 32 deletions
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go
index 9d7835bc2..9fca2e165 100644
--- a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go
@@ -17,20 +17,15 @@ limitations under the License.
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto
-/*
-Package resource is a generated protocol buffer package.
+package resource
-It is generated from these files:
- k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto
+import (
+ fmt "fmt"
-It has these top-level messages:
- Quantity
-*/
-package resource
+ math "math"
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
+ proto "github.com/gogo/protobuf/proto"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -43,19 +38,38 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-func (m *Quantity) Reset() { *m = Quantity{} }
-func (*Quantity) ProtoMessage() {}
-func (*Quantity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+func (m *Quantity) Reset() { *m = Quantity{} }
+func (*Quantity) ProtoMessage() {}
+func (*Quantity) Descriptor() ([]byte, []int) {
+ return fileDescriptor_612bba87bd70906c, []int{0}
+}
+func (m *Quantity) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Quantity.Unmarshal(m, b)
+}
+func (m *Quantity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Quantity.Marshal(b, m, deterministic)
+}
+func (m *Quantity) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Quantity.Merge(m, src)
+}
+func (m *Quantity) XXX_Size() int {
+ return xxx_messageInfo_Quantity.Size(m)
+}
+func (m *Quantity) XXX_DiscardUnknown() {
+ xxx_messageInfo_Quantity.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Quantity proto.InternalMessageInfo
func init() {
proto.RegisterType((*Quantity)(nil), "k8s.io.apimachinery.pkg.api.resource.Quantity")
}
func init() {
- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto", fileDescriptorGenerated)
+ proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto", fileDescriptor_612bba87bd70906c)
}
-var fileDescriptorGenerated = []byte{
+var fileDescriptor_612bba87bd70906c = []byte{
// 237 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8e, 0xb1, 0x4e, 0xc3, 0x30,
0x10, 0x40, 0xcf, 0x0b, 0x2a, 0x19, 0x2b, 0x84, 0x10, 0xc3, 0xa5, 0x42, 0x0c, 0x2c, 0xd8, 0x6b,
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go
index 93a6c0c50..b73b3b141 100644
--- a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go
@@ -697,7 +697,9 @@ func (q *Quantity) MilliValue() int64 {
return q.ScaledValue(Milli)
}
-// ScaledValue returns the value of ceil(q * 10^scale); this could overflow an int64.
+// ScaledValue returns the value of ceil(q / 10^scale).
+// For example, NewQuantity(1, DecimalSI).ScaledValue(Milli) returns 1000.
+// This could overflow an int64.
// To detect overflow, call Value() first and verify the expected magnitude.
func (q *Quantity) ScaledValue(scale Scale) int64 {
if q.d.Dec == nil {
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go
index 74dfb4e4b..f89ca163c 100644
--- a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go
@@ -19,6 +19,7 @@ package resource
import (
"fmt"
"io"
+ "math/bits"
"github.com/gogo/protobuf/proto"
)
@@ -28,7 +29,7 @@ var _ proto.Sizer = &Quantity{}
func (m *Quantity) Marshal() (data []byte, err error) {
size := m.Size()
data = make([]byte, size)
- n, err := m.MarshalTo(data)
+ n, err := m.MarshalToSizedBuffer(data[:size])
if err != nil {
return nil, err
}
@@ -38,30 +39,40 @@ func (m *Quantity) Marshal() (data []byte, err error) {
// MarshalTo is a customized version of the generated Protobuf unmarshaler for a struct
// with a single string field.
func (m *Quantity) MarshalTo(data []byte) (int, error) {
- var i int
+ size := m.Size()
+ return m.MarshalToSizedBuffer(data[:size])
+}
+
+// MarshalToSizedBuffer is a customized version of the generated
+// Protobuf unmarshaler for a struct with a single string field.
+func (m *Quantity) MarshalToSizedBuffer(data []byte) (int, error) {
+ i := len(data)
_ = i
var l int
_ = l
- data[i] = 0xa
- i++
// BEGIN CUSTOM MARSHAL
out := m.String()
+ i -= len(out)
+ copy(data[i:], out)
i = encodeVarintGenerated(data, i, uint64(len(out)))
- i += copy(data[i:], out)
// END CUSTOM MARSHAL
+ i--
+ data[i] = 0xa
- return i, nil
+ return len(data) - i, nil
}
func encodeVarintGenerated(data []byte, offset int, v uint64) int {
+ offset -= sovGenerated(v)
+ base := offset
for v >= 1<<7 {
data[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
data[offset] = uint8(v)
- return offset + 1
+ return base
}
func (m *Quantity) Size() (n int) {
@@ -77,14 +88,7 @@ func (m *Quantity) Size() (n int) {
}
func sovGenerated(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
+ return (bits.Len64(x|1) + 6) / 7
}
// Unmarshal is a customized version of the generated Protobuf unmarshaler for a struct