Add exited at to events and delete requests

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-04-13 13:55:58 -07:00
parent d41f146eed
commit efe177ed77
14 changed files with 351 additions and 189 deletions

View File

@@ -20,6 +20,11 @@ import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import _ "github.com/gogo/protobuf/types"
import time "time"
import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
import strings "strings"
import reflect "reflect"
@@ -30,6 +35,7 @@ import io "io"
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _ = time.Kitchen
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
@@ -140,6 +146,7 @@ type Event struct {
Type Event_EventType `protobuf:"varint,2,opt,name=type,proto3,enum=containerd.v1.types.Event_EventType" json:"type,omitempty"`
Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`
ExitStatus uint32 `protobuf:"varint,4,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
ExitedAt time.Time `protobuf:"bytes,5,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"`
}
func (m *Event) Reset() { *m = Event{} }
@@ -358,6 +365,14 @@ func (m *Event) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintContainer(dAtA, i, uint64(m.ExitStatus))
}
dAtA[i] = 0x2a
i++
i = encodeVarintContainer(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)))
n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n4
return i, nil
}
@@ -477,6 +492,8 @@ func (m *Event) Size() (n int) {
if m.ExitStatus != 0 {
n += 1 + sovContainer(uint64(m.ExitStatus))
}
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)
n += 1 + l + sovContainer(uint64(l))
return n
}
@@ -543,6 +560,7 @@ func (this *Event) String() string {
`Type:` + fmt.Sprintf("%v", this.Type) + `,`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
`ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf1.Timestamp", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
@@ -1184,6 +1202,36 @@ func (m *Event) Unmarshal(dAtA []byte) error {
break
}
}
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ExitedAt", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowContainer
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthContainer
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipContainer(dAtA[iNdEx:])
@@ -1315,38 +1363,41 @@ func init() {
}
var fileDescriptorContainer = []byte{
// 516 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x41, 0x8b, 0xd3, 0x5c,
0x14, 0xed, 0x4b, 0xd2, 0xb4, 0xbd, 0x65, 0xfa, 0x3d, 0xde, 0x27, 0x12, 0x47, 0xc8, 0x84, 0x22,
0x18, 0x04, 0x53, 0xec, 0x6c, 0xdc, 0x76, 0x9a, 0x30, 0x16, 0x31, 0xad, 0xaf, 0x29, 0xce, 0xae,
0x64, 0x9a, 0x10, 0x9f, 0xcc, 0x24, 0x25, 0x79, 0xad, 0xce, 0xce, 0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0xd9, 0xd4, 0x73,
0x71, 0xfd, 0xc5, 0x1b, 0xd0, 0xb7, 0xa9, 0xb7, 0xa1, 0x31, 0xf3, 0xdf, 0xfa, 0xe3, 0x0f, 0x3e,
0xae, 0x89, 0xa2, 0x54, 0x72, 0x31, 0x12, 0x05, 0x9d, 0xf9, 0xfe, 0xc8, 0x3f, 0xc7, 0x8a, 0x28,
0xa6, 0xc1, 0x78, 0x32, 0xf1, 0x5c, 0xac, 0xee, 0x29, 0x69, 0x67, 0xc6, 0xed, 0x9d, 0x59, 0xfb,
0x7e, 0x67, 0xd6, 0xbe, 0x6e, 0x4c, 0x74, 0xbb, 0x31, 0xd1, 0xb7, 0x8d, 0x89, 0x7e, 0x6d, 0x4c,
0x74, 0xa9, 0xcb, 0x9f, 0xe0, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x79, 0x66, 0x96, 0xba,
0x77, 0x03, 0x00, 0x00,
// 576 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcf, 0x6e, 0xd3, 0x4e,
0x18, 0xcc, 0xda, 0xce, 0xbf, 0x2f, 0x6a, 0x7e, 0xd6, 0xfe, 0x10, 0x32, 0x41, 0x4a, 0xa2, 0x08,
0x09, 0x0b, 0x09, 0x47, 0xa4, 0x17, 0xae, 0x6e, 0x6d, 0x95, 0x0a, 0xe1, 0x84, 0x8d, 0x23, 0x7a,
0x8b, 0xdc, 0x78, 0x31, 0x8b, 0x1a, 0xdb, 0xb2, 0xd7, 0x85, 0xde, 0x78, 0x04, 0x9e, 0x81, 0xa7,
0xe9, 0x91, 0x23, 0xa7, 0x42, 0xf3, 0x0c, 0x3c, 0x00, 0xda, 0x75, 0x52, 0x57, 0x50, 0x24, 0x2e,
0xd1, 0xcc, 0x97, 0xd9, 0xf1, 0xcc, 0xb7, 0x0b, 0x4e, 0xc4, 0xf8, 0xbb, 0xe2, 0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
0x75, 0x05, 0xb7, 0xa1, 0x3e, 0xf7, 0x6d, 0xe2, 0xeb, 0x2a, 0xee, 0x02, 0xb8, 0x27, 0xee, 0xe1,
0xd2, 0x76, 0x1c, 0xd7, 0xd1, 0x35, 0x21, 0x9b, 0xd9, 0x8b, 0xb9, 0xeb, 0xe8, 0xf5, 0x27, 0x2f,
0xa0, 0xb1, 0xcd, 0xd7, 0x81, 0xe6, 0xc2, 0x7b, 0xe9, 0x4d, 0xdf, 0x78, 0x7a, 0x4d, 0x90, 0xd2,
0xc9, 0xd1, 0x91, 0x20, 0x64, 0xe1, 0x79, 0xc7, 0xde, 0x91, 0xae, 0x08, 0x32, 0xf7, 0xa7, 0xb3,
0x99, 0xeb, 0xe8, 0xea, 0x2d, 0x27, 0xed, 0xc0, 0xb8, 0xbc, 0xee, 0xd7, 0xbe, 0x5d, 0xf7, 0x6b,
0x9f, 0x36, 0x7d, 0x74, 0xb9, 0xe9, 0xa3, 0xaf, 0x9b, 0x3e, 0xfa, 0xb1, 0xe9, 0xa3, 0xd3, 0x86,
0xac, 0xb7, 0xff, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xfb, 0xbb, 0xac, 0xdb, 0x03, 0x00, 0x00,
}

View File

@@ -3,6 +3,7 @@ syntax = "proto3";
package containerd.v1.types;
import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
enum Status {
UNKNOWN = 0;
@@ -50,4 +51,6 @@ message Event {
EventType type = 2;
uint32 pid = 3;
uint32 exit_status = 4;
google.protobuf.Timestamp exited_at = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
}