Remove client use of gc root label

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2017-10-31 17:43:22 -07:00
parent e13894bb7a
commit dce27d8c62
11 changed files with 56 additions and 335 deletions

View File

@@ -9,7 +9,6 @@
github.com/containerd/containerd/api/services/leases/v1/leases.proto
It has these top-level messages:
Snapshot
Lease
CreateRequest
CreateResponse
@@ -53,16 +52,6 @@ var _ = time.Kitchen
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// Snapshot is a snapshot resource reference.
type Snapshot struct {
Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
}
func (m *Snapshot) Reset() { *m = Snapshot{} }
func (*Snapshot) ProtoMessage() {}
func (*Snapshot) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{0} }
// Lease is an object which retains resources while it exists.
type Lease struct {
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
@@ -72,7 +61,7 @@ type Lease struct {
func (m *Lease) Reset() { *m = Lease{} }
func (*Lease) ProtoMessage() {}
func (*Lease) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{1} }
func (*Lease) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{0} }
type CreateRequest struct {
// ID is used to identity the lease, when the id is not set the service
@@ -83,7 +72,7 @@ type CreateRequest struct {
func (m *CreateRequest) Reset() { *m = CreateRequest{} }
func (*CreateRequest) ProtoMessage() {}
func (*CreateRequest) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{2} }
func (*CreateRequest) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{1} }
type CreateResponse struct {
Lease *Lease `protobuf:"bytes,1,opt,name=lease" json:"lease,omitempty"`
@@ -91,7 +80,7 @@ type CreateResponse struct {
func (m *CreateResponse) Reset() { *m = CreateResponse{} }
func (*CreateResponse) ProtoMessage() {}
func (*CreateResponse) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{3} }
func (*CreateResponse) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{2} }
type DeleteRequest struct {
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
@@ -99,7 +88,7 @@ type DeleteRequest struct {
func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
func (*DeleteRequest) ProtoMessage() {}
func (*DeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{4} }
func (*DeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{3} }
type ListRequest struct {
Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"`
@@ -107,7 +96,7 @@ type ListRequest struct {
func (m *ListRequest) Reset() { *m = ListRequest{} }
func (*ListRequest) ProtoMessage() {}
func (*ListRequest) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{5} }
func (*ListRequest) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{4} }
type ListResponse struct {
Leases []*Lease `protobuf:"bytes,1,rep,name=leases" json:"leases,omitempty"`
@@ -115,10 +104,9 @@ type ListResponse struct {
func (m *ListResponse) Reset() { *m = ListResponse{} }
func (*ListResponse) ProtoMessage() {}
func (*ListResponse) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{6} }
func (*ListResponse) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{5} }
func init() {
proto.RegisterType((*Snapshot)(nil), "containerd.services.leases.v1.Snapshot")
proto.RegisterType((*Lease)(nil), "containerd.services.leases.v1.Lease")
proto.RegisterType((*CreateRequest)(nil), "containerd.services.leases.v1.CreateRequest")
proto.RegisterType((*CreateResponse)(nil), "containerd.services.leases.v1.CreateResponse")
@@ -279,36 +267,6 @@ var _Leases_serviceDesc = grpc.ServiceDesc{
Metadata: "github.com/containerd/containerd/api/services/leases/v1/leases.proto",
}
func (m *Snapshot) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Snapshotter) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintLeases(dAtA, i, uint64(len(m.Snapshotter)))
i += copy(dAtA[i:], m.Snapshotter)
}
if len(m.Key) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintLeases(dAtA, i, uint64(len(m.Key)))
i += copy(dAtA[i:], m.Key)
}
return i, nil
}
func (m *Lease) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -541,20 +499,6 @@ func encodeVarintLeases(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *Snapshot) Size() (n int) {
var l int
_ = l
l = len(m.Snapshotter)
if l > 0 {
n += 1 + l + sovLeases(uint64(l))
}
l = len(m.Key)
if l > 0 {
n += 1 + l + sovLeases(uint64(l))
}
return n
}
func (m *Lease) Size() (n int) {
var l int
_ = l
@@ -650,17 +594,6 @@ func sovLeases(x uint64) (n int) {
func sozLeases(x uint64) (n int) {
return sovLeases(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *Snapshot) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Snapshot{`,
`Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`,
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
`}`,
}, "")
return s
}
func (this *Lease) String() string {
if this == nil {
return "nil"
@@ -752,114 +685,6 @@ func valueToStringLeases(v interface{}) string {
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *Snapshot) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowLeases
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Snapshot: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Snapshotter", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowLeases
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthLeases
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Snapshotter = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowLeases
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthLeases
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Key = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipLeases(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthLeases
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Lease) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
@@ -1712,38 +1537,37 @@ func init() {
}
var fileDescriptorLeases = []byte{
// 525 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x4f, 0x6b, 0x13, 0x41,
0x18, 0xc6, 0x33, 0x1b, 0xb3, 0x36, 0xef, 0x5a, 0x91, 0xa1, 0x94, 0xb0, 0xe2, 0x26, 0x2c, 0x42,
0x83, 0x7f, 0x66, 0x6d, 0xbc, 0xd4, 0x2a, 0x05, 0xd3, 0x14, 0x14, 0x82, 0xc8, 0xea, 0x41, 0xbc,
0x94, 0x4d, 0xf2, 0x36, 0x5d, 0xdc, 0x64, 0xd6, 0x9d, 0x49, 0x20, 0x37, 0x3f, 0x82, 0x1f, 0xc1,
0x0f, 0xe1, 0x87, 0xc8, 0xd1, 0xa3, 0xa7, 0x6a, 0x73, 0xf3, 0x5b, 0x48, 0x66, 0x66, 0x6d, 0x5a,
0xd1, 0x44, 0xe9, 0xed, 0x9d, 0x99, 0xe7, 0xd9, 0xf9, 0x3d, 0x0f, 0xcc, 0x42, 0xab, 0x1f, 0xcb,
0xe3, 0x51, 0x87, 0x75, 0xf9, 0x20, 0xe8, 0xf2, 0xa1, 0x8c, 0xe2, 0x21, 0x66, 0xbd, 0xc5, 0x31,
0x4a, 0xe3, 0x40, 0x60, 0x36, 0x8e, 0xbb, 0x28, 0x82, 0x04, 0x23, 0x81, 0x22, 0x18, 0x6f, 0x9b,
0x89, 0xa5, 0x19, 0x97, 0x9c, 0xde, 0x3a, 0xd3, 0xb3, 0x5c, 0xcb, 0x8c, 0x62, 0xbc, 0xed, 0x6e,
0xf4, 0x79, 0x9f, 0x2b, 0x65, 0x30, 0x9f, 0xb4, 0xc9, 0xbd, 0xd9, 0xe7, 0xbc, 0x9f, 0x60, 0xa0,
0x56, 0x9d, 0xd1, 0x51, 0x80, 0x83, 0x54, 0x4e,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, 0x7a, 0xb7, 0x19, 0x54, 0x47, 0xd7, 0x87,
0xab, 0x5a, 0x58, 0xd2, 0x3d, 0x06, 0x53, 0xcf, 0x56, 0xc2, 0x75, 0xf1, 0x4a, 0x4f, 0xef, 0x93,
0x01, 0xa6, 0xfa, 0x22, 0x28, 0x82, 0xa9, 0x17, 0xa7, 0x77, 0xff, 0x26, 0x7f, 0xfb, 0xde, 0x9a,
0xea, 0x92, 0xf7, 0x05, 0x98, 0x3a, 0x91, 0x95, 0x63, 0xce, 0x05, 0x67, 0x6f, 0xfd, 0xf2, 0x08,
0x0e, 0x8a, 0x97, 0x47, 0x0f, 0xe1, 0x52, 0x91, 0x07, 0xbd, 0xbd, 0x6a, 0xef, 0xd3, 0x74, 0xed,
0x3b, 0x6b, 0x69, 0x35, 0x70, 0xff, 0xf5, 0xf2, 0xc4, 0xa9, 0x7d, 0x3d, 0x71, 0x6a, 0x1f, 0x72,
0x87, 0x2c, 0x73, 0x87, 0x7c, 0xc9, 0x1d, 0xf2, 0x3d, 0x77, 0xc8, 0x9b, 0x27, 0xff, 0xf8, 0x1b,
0x7a, 0xa4, 0xab, 0xa1, 0xa9, 0x56, 0x79, 0xf0, 0x33, 0x00, 0x00, 0xff, 0xff, 0x1d, 0xb9, 0xa6,
0x63, 0xcf, 0x04, 0x00, 0x00,
}

View File

@@ -24,12 +24,6 @@ service Leases {
rpc List(ListRequest) returns (ListResponse);
}
// Snapshot is a snapshot resource reference.
message Snapshot {
string snapshotter = 1;
string key = 2;
}
// Lease is an object which retains resources while it exists.
message Lease {
string id = 1;