Move metrics requests to services

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2017-09-05 17:34:10 -04:00
parent c07f7cab37
commit 4c5ed9c068
9 changed files with 436 additions and 436 deletions

View File

@ -2890,27 +2890,6 @@ file {
dependency: "gogoproto/gogo.proto"
dependency: "google/protobuf/any.proto"
dependency: "google/protobuf/timestamp.proto"
message_type {
name: "MetricsRequest"
field {
name: "filters"
number: 1
label: LABEL_REPEATED
type: TYPE_STRING
json_name: "filters"
}
}
message_type {
name: "MetricsResponse"
field {
name: "metrics"
number: 1
label: LABEL_REPEATED
type: TYPE_MESSAGE
type_name: ".containerd.types.Metric"
json_name: "metrics"
}
}
message_type {
name: "Metric"
field {
@ -3550,6 +3529,27 @@ file {
json_name: "resources"
}
}
message_type {
name: "MetricsRequest"
field {
name: "filters"
number: 1
label: LABEL_REPEATED
type: TYPE_STRING
json_name: "filters"
}
}
message_type {
name: "MetricsResponse"
field {
name: "metrics"
number: 1
label: LABEL_REPEATED
type: TYPE_MESSAGE
type_name: ".containerd.types.Metric"
json_name: "metrics"
}
}
service {
name: "Tasks"
method {
@ -3629,8 +3629,8 @@ file {
}
method {
name: "Metrics"
input_type: ".containerd.types.MetricsRequest"
output_type: ".containerd.types.MetricsResponse"
input_type: ".containerd.services.tasks.v1.MetricsRequest"
output_type: ".containerd.services.tasks.v1.MetricsResponse"
}
}
options {

View File

@ -32,6 +32,8 @@
CheckpointTaskRequest
CheckpointTaskResponse
UpdateTaskRequest
MetricsRequest
MetricsResponse
*/
package tasks
@ -298,6 +300,22 @@ func (m *UpdateTaskRequest) Reset() { *m = UpdateTaskRequest{
func (*UpdateTaskRequest) ProtoMessage() {}
func (*UpdateTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{22} }
type MetricsRequest struct {
Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"`
}
func (m *MetricsRequest) Reset() { *m = MetricsRequest{} }
func (*MetricsRequest) ProtoMessage() {}
func (*MetricsRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{23} }
type MetricsResponse struct {
Metrics []*containerd_types1.Metric `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"`
}
func (m *MetricsResponse) Reset() { *m = MetricsResponse{} }
func (*MetricsResponse) ProtoMessage() {}
func (*MetricsResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{24} }
func init() {
proto.RegisterType((*CreateTaskRequest)(nil), "containerd.services.tasks.v1.CreateTaskRequest")
proto.RegisterType((*CreateTaskResponse)(nil), "containerd.services.tasks.v1.CreateTaskResponse")
@ -322,6 +340,8 @@ func init() {
proto.RegisterType((*CheckpointTaskRequest)(nil), "containerd.services.tasks.v1.CheckpointTaskRequest")
proto.RegisterType((*CheckpointTaskResponse)(nil), "containerd.services.tasks.v1.CheckpointTaskResponse")
proto.RegisterType((*UpdateTaskRequest)(nil), "containerd.services.tasks.v1.UpdateTaskRequest")
proto.RegisterType((*MetricsRequest)(nil), "containerd.services.tasks.v1.MetricsRequest")
proto.RegisterType((*MetricsResponse)(nil), "containerd.services.tasks.v1.MetricsResponse")
}
// Reference imports to suppress errors if they are not otherwise used.
@ -354,7 +374,7 @@ type TasksClient interface {
ListPids(ctx context.Context, in *ListPidsRequest, opts ...grpc.CallOption) (*ListPidsResponse, error)
Checkpoint(ctx context.Context, in *CheckpointTaskRequest, opts ...grpc.CallOption) (*CheckpointTaskResponse, error)
Update(ctx context.Context, in *UpdateTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
Metrics(ctx context.Context, in *containerd_types1.MetricsRequest, opts ...grpc.CallOption) (*containerd_types1.MetricsResponse, error)
Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error)
}
type tasksClient struct {
@ -500,8 +520,8 @@ func (c *tasksClient) Update(ctx context.Context, in *UpdateTaskRequest, opts ..
return out, nil
}
func (c *tasksClient) Metrics(ctx context.Context, in *containerd_types1.MetricsRequest, opts ...grpc.CallOption) (*containerd_types1.MetricsResponse, error) {
out := new(containerd_types1.MetricsResponse)
func (c *tasksClient) Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) {
out := new(MetricsResponse)
err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Metrics", in, out, c.cc, opts...)
if err != nil {
return nil, err
@ -531,7 +551,7 @@ type TasksServer interface {
ListPids(context.Context, *ListPidsRequest) (*ListPidsResponse, error)
Checkpoint(context.Context, *CheckpointTaskRequest) (*CheckpointTaskResponse, error)
Update(context.Context, *UpdateTaskRequest) (*google_protobuf.Empty, error)
Metrics(context.Context, *containerd_types1.MetricsRequest) (*containerd_types1.MetricsResponse, error)
Metrics(context.Context, *MetricsRequest) (*MetricsResponse, error)
}
func RegisterTasksServer(s *grpc.Server, srv TasksServer) {
@ -809,7 +829,7 @@ func _Tasks_Update_Handler(srv interface{}, ctx context.Context, dec func(interf
}
func _Tasks_Metrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(containerd_types1.MetricsRequest)
in := new(MetricsRequest)
if err := dec(in); err != nil {
return nil, err
}
@ -821,7 +841,7 @@ func _Tasks_Metrics_Handler(srv interface{}, ctx context.Context, dec func(inter
FullMethod: "/containerd.services.tasks.v1.Tasks/Metrics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TasksServer).Metrics(ctx, req.(*containerd_types1.MetricsRequest))
return srv.(TasksServer).Metrics(ctx, req.(*MetricsRequest))
}
return interceptor(ctx, in, info, handler)
}
@ -1695,6 +1715,69 @@ func (m *UpdateTaskRequest) MarshalTo(dAtA []byte) (int, error) {
return i, nil
}
func (m *MetricsRequest) 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 *MetricsRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Filters) > 0 {
for _, s := range m.Filters {
dAtA[i] = 0xa
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
return i, nil
}
func (m *MetricsResponse) 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 *MetricsResponse) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Metrics) > 0 {
for _, msg := range m.Metrics {
dAtA[i] = 0xa
i++
i = encodeVarintTasks(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
return i, nil
}
func encodeFixed64Tasks(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
@ -2068,6 +2151,30 @@ func (m *UpdateTaskRequest) Size() (n int) {
return n
}
func (m *MetricsRequest) Size() (n int) {
var l int
_ = l
if len(m.Filters) > 0 {
for _, s := range m.Filters {
l = len(s)
n += 1 + l + sovTasks(uint64(l))
}
}
return n
}
func (m *MetricsResponse) Size() (n int) {
var l int
_ = l
if len(m.Metrics) > 0 {
for _, e := range m.Metrics {
l = e.Size()
n += 1 + l + sovTasks(uint64(l))
}
}
return n
}
func sovTasks(x uint64) (n int) {
for {
n++
@ -2341,6 +2448,26 @@ func (this *UpdateTaskRequest) String() string {
}, "")
return s
}
func (this *MetricsRequest) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&MetricsRequest{`,
`Filters:` + fmt.Sprintf("%v", this.Filters) + `,`,
`}`,
}, "")
return s
}
func (this *MetricsResponse) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&MetricsResponse{`,
`Metrics:` + strings.Replace(fmt.Sprintf("%v", this.Metrics), "Metric", "containerd_types1.Metric", 1) + `,`,
`}`,
}, "")
return s
}
func valueToStringTasks(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
@ -4994,6 +5121,166 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *MetricsRequest) 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 ErrIntOverflowTasks
}
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: MetricsRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MetricsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTasks
}
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 ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTasks(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTasks
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *MetricsResponse) 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 ErrIntOverflowTasks
}
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: MetricsResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MetricsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTasks
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Metrics = append(m.Metrics, &containerd_types1.Metric{})
if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTasks(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTasks
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipTasks(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
@ -5104,83 +5391,85 @@ func init() {
}
var fileDescriptorTasks = []byte{
// 1238 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x5f, 0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0x35, 0x3b, 0x47, 0x12, 0xd5, 0x4a, 0x33, 0xe6, 0x15, 0x97, 0x19,
0xf5, 0x02, 0x20, 0x41, 0xf0, 0x77, 0x66, 0x40, 0x3c, 0xae, 0x54, 0x69, 0x9f, 0x9c, 0x4f, 0x49,
0x1e, 0xfc, 0x18, 0x54, 0xc1, 0xe0, 0xb3, 0x60, 0x1b, 0xe1, 0xf9, 0x89, 0xb0, 0x7d, 0x0d, 0xb9,
0x87, 0xe2, 0x63, 0x03, 0xaa, 0x8e, 0xf9, 0xc9, 0x2d, 0xb6, 0x06, 0x46, 0x6e, 0x4c, 0x91, 0x10,
0x2e, 0xae, 0x7f, 0x7b, 0xfc, 0xaa, 0x7c, 0xe9, 0xf7, 0x57, 0xe5, 0x4b, 0x3f, 0xf7, 0xcb, 0xca,
0x71, 0xbf, 0xac, 0xfc, 0xd6, 0x2f, 0x2b, 0x7f, 0xf7, 0xcb, 0xca, 0xb3, 0xfb, 0xaf, 0xf7, 0x9d,
0xe7, 0x1e, 0x1f, 0xec, 0xa8, 0xdc, 0xef, 0x3b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x63, 0x7a,
0xe4, 0x79, 0x2e, 0x12, 0x00, 0x00,
// 1274 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4f, 0x6f, 0x1b, 0x45,
0x14, 0xef, 0xc6, 0xf6, 0xda, 0x7e, 0x6e, 0xda, 0x64, 0x48, 0xc3, 0xb2, 0x54, 0x71, 0x58, 0x24,
0x64, 0x02, 0xdd, 0xa5, 0x2e, 0xaa, 0x10, 0xad, 0x90, 0x9a, 0x3f, 0x44, 0x16, 0x54, 0x4d, 0xb7,
0x05, 0xa1, 0x5e, 0xc2, 0x76, 0x77, 0xe2, 0x8c, 0x62, 0xef, 0x6e, 0x77, 0xc6, 0x69, 0x03, 0x07,
0xf8, 0x08, 0xbd, 0x72, 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8, 0xca, 0xa8, 0xe7, 0x00, 0xb9, 0x9e, 0x72, 0x6b, 0x0c, 0xc5, 0xa7,
0x75, 0x47, 0xf3, 0xd3, 0xf3, 0x19, 0xa9, 0x8d, 0x1f, 0x82, 0x2e, 0x9b, 0xc6, 0x38, 0xda, 0x86,
0x5a, 0xcb, 0x48, 0xda, 0x76, 0xa0, 0xac, 0xca, 0xfb, 0xb8, 0x5c, 0x39, 0xd9, 0x31, 0xcc, 0x1b,
0x13, 0xa2, 0x65, 0xe8, 0xab, 0xdf, 0x1e, 0xbe, 0x5a, 0xba, 0xf4, 0xfb, 0xab, 0xa5, 0x4b, 0x3f,
0xf7, 0x97, 0xb4, 0xc3, 0xfe, 0x92, 0xf6, 0x5b, 0x7f, 0x49, 0xfb, 0xbb, 0xbf, 0xa4, 0x3d, 0xb9,
0xfb, 0x7a, 0x7f, 0x72, 0xba, 0x23, 0x06, 0x4f, 0x75, 0x71, 0x9e, 0x5b, 0xff, 0x05, 0x00, 0x00,
0xff, 0xff, 0x5e, 0xf6, 0xae, 0x85, 0xb9, 0x12, 0x00, 0x00,
}

View File

@ -48,7 +48,7 @@ service Tasks {
rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty);
rpc Metrics(types.MetricsRequest) returns (types.MetricsResponse);
rpc Metrics(MetricsRequest) returns (MetricsResponse);
}
message CreateTaskRequest {
@ -186,3 +186,11 @@ message UpdateTaskRequest {
string container_id = 1;
google.protobuf.Any resources = 2;
}
message MetricsRequest {
repeated string filters = 1;
}
message MetricsResponse {
repeated types.Metric metrics = 1;
}

View File

@ -12,8 +12,6 @@
It has these top-level messages:
Descriptor
MetricsRequest
MetricsResponse
Metric
Mount
*/

View File

@ -26,22 +26,6 @@ var _ = fmt.Errorf
var _ = math.Inf
var _ = time.Kitchen
type MetricsRequest struct {
Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"`
}
func (m *MetricsRequest) Reset() { *m = MetricsRequest{} }
func (*MetricsRequest) ProtoMessage() {}
func (*MetricsRequest) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{0} }
type MetricsResponse struct {
Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"`
}
func (m *MetricsResponse) Reset() { *m = MetricsResponse{} }
func (*MetricsResponse) ProtoMessage() {}
func (*MetricsResponse) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{1} }
type Metric struct {
Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,stdtime" json:"timestamp"`
ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
@ -50,76 +34,11 @@ type Metric struct {
func (m *Metric) Reset() { *m = Metric{} }
func (*Metric) ProtoMessage() {}
func (*Metric) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{2} }
func (*Metric) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{0} }
func init() {
proto.RegisterType((*MetricsRequest)(nil), "containerd.types.MetricsRequest")
proto.RegisterType((*MetricsResponse)(nil), "containerd.types.MetricsResponse")
proto.RegisterType((*Metric)(nil), "containerd.types.Metric")
}
func (m *MetricsRequest) 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 *MetricsRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Filters) > 0 {
for _, s := range m.Filters {
dAtA[i] = 0xa
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
return i, nil
}
func (m *MetricsResponse) 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 *MetricsResponse) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Metrics) > 0 {
for _, msg := range m.Metrics {
dAtA[i] = 0xa
i++
i = encodeVarintMetrics(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
return i, nil
}
func (m *Metric) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@ -189,30 +108,6 @@ func encodeVarintMetrics(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *MetricsRequest) Size() (n int) {
var l int
_ = l
if len(m.Filters) > 0 {
for _, s := range m.Filters {
l = len(s)
n += 1 + l + sovMetrics(uint64(l))
}
}
return n
}
func (m *MetricsResponse) Size() (n int) {
var l int
_ = l
if len(m.Metrics) > 0 {
for _, e := range m.Metrics {
l = e.Size()
n += 1 + l + sovMetrics(uint64(l))
}
}
return n
}
func (m *Metric) Size() (n int) {
var l int
_ = l
@ -242,26 +137,6 @@ func sovMetrics(x uint64) (n int) {
func sozMetrics(x uint64) (n int) {
return sovMetrics(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *MetricsRequest) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&MetricsRequest{`,
`Filters:` + fmt.Sprintf("%v", this.Filters) + `,`,
`}`,
}, "")
return s
}
func (this *MetricsResponse) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&MetricsResponse{`,
`Metrics:` + strings.Replace(fmt.Sprintf("%v", this.Metrics), "Metric", "Metric", 1) + `,`,
`}`,
}, "")
return s
}
func (this *Metric) String() string {
if this == nil {
return "nil"
@ -282,166 +157,6 @@ func valueToStringMetrics(v interface{}) string {
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *MetricsRequest) 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 ErrIntOverflowMetrics
}
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: MetricsRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MetricsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMetrics
}
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 ErrInvalidLengthMetrics
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMetrics(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthMetrics
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *MetricsResponse) 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 ErrIntOverflowMetrics
}
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: MetricsResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MetricsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMetrics
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthMetrics
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Metrics = append(m.Metrics, &Metric{})
if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMetrics(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthMetrics
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Metric) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
@ -694,25 +409,21 @@ func init() {
}
var fileDescriptorMetrics = []byte{
// 319 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x31, 0x4b, 0x03, 0x31,
0x14, 0xc7, 0x9b, 0xab, 0xb4, 0x36, 0x05, 0x95, 0xa3, 0x48, 0xec, 0x90, 0x2b, 0x9d, 0x0e, 0x87,
0x44, 0xea, 0x22, 0x38, 0x79, 0xe8, 0xa0, 0xe0, 0x12, 0x9c, 0xdc, 0xd2, 0x5e, 0x7a, 0x06, 0x7a,
0x97, 0xf3, 0x92, 0x0e, 0xdd, 0xfc, 0x04, 0xe2, 0xc7, 0xba, 0xd1, 0xd1, 0xa9, 0xda, 0xfb, 0x24,
0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06, 0xde, 0xed, 0x35, 0xf3, 0x64,
0xec, 0x87, 0x70, 0x2f, 0xe6, 0x86, 0xa3, 0xa6, 0x5d, 0xdb, 0xfb, 0xb3, 0xf6, 0x2a, 0x5b, 0x30,
0x4b, 0x44, 0x77, 0xe5, 0x0a, 0x37, 0x3e, 0x56, 0xb8, 0xf1, 0x52, 0x61, 0x50, 0x56, 0x18, 0xbc,
0x57, 0x18, 0x7c, 0x55, 0x18, 0x3c, 0x9e, 0xfd, 0xff, 0xef, 0x2e, 0xed, 0x39, 0x6e, 0xd9, 0xfd,
0xe7, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x95, 0xe4, 0x62, 0x3d, 0xf6, 0x01, 0x00, 0x00,
// 256 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x48, 0xcf, 0x2c, 0xc9,
0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xe7, 0xa6, 0x96,
0x14, 0x65, 0x26, 0x17, 0xeb, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20, 0xd4, 0xe8, 0x81,
0xe5, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x92, 0xfa, 0x20, 0x16, 0x44, 0x9d, 0x94, 0x64,
0x7a, 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, 0x3e, 0x98, 0x97, 0x54, 0x9a, 0xa6, 0x9f, 0x98, 0x57, 0x09,
0x95, 0x92, 0x47, 0x97, 0x2a, 0xc9, 0xcc, 0x4d, 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0x80, 0x28, 0x50,
0xea, 0x63, 0xe4, 0x62, 0xf3, 0x05, 0xdb, 0x2a, 0xe4, 0xc4, 0xc5, 0x09, 0x97, 0x95, 0x60, 0x54,
0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd2, 0x83, 0xe8, 0xd7, 0x83, 0xe9, 0xd7, 0x0b, 0x81, 0xa9, 0x70,
0xe2, 0x38, 0x71, 0x4f, 0x9e, 0x61, 0xc2, 0x7d, 0x79, 0xc6, 0x20, 0x84, 0x36, 0x21, 0x31, 0x2e,
0xa6, 0xcc, 0x14, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0xb6, 0x47, 0xf7, 0xe4, 0x99, 0x3c,
0x5d, 0x82, 0x98, 0x32, 0x53, 0x84, 0x34, 0xb8, 0x58, 0x52, 0x12, 0x4b, 0x12, 0x25, 0x98, 0xc1,
0xc6, 0x8a, 0x60, 0x18, 0xeb, 0x98, 0x57, 0x19, 0x04, 0x56, 0xe1, 0xe4, 0x75, 0xe2, 0xa1, 0x1c,
0xc3, 0x8d, 0x87, 0x72, 0x0c, 0x0d, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48,
0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x28, 0x03, 0xe2, 0x03, 0xd2, 0x1a, 0x4c, 0x26, 0xb1, 0x81,
0xcd, 0x37, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x51, 0x36, 0x74, 0x83, 0x01, 0x00, 0x00,
}

View File

@ -8,14 +8,6 @@ import "google/protobuf/timestamp.proto";
option go_package = "github.com/containerd/containerd/api/types;types";
message MetricsRequest {
repeated string filters = 1;
}
message MetricsResponse {
repeated Metric metrics = 1;
}
message Metric {
google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
string id = 2;

View File

@ -344,13 +344,13 @@ func (r *Runtime) loadTasks(ctx context.Context, ns string) ([]*Task, error) {
filepath.Join(r.state, ns, id),
filepath.Join(r.root, ns, id),
)
pid, _ := runc.ReadPidFile(filepath.Join(bundle.path, client.InitPidFile))
s, err := bundle.NewShimClient(ctx, ns, ShimConnect(), nil)
if err != nil {
log.G(ctx).WithError(err).WithFields(logrus.Fields{
"id": id,
"namespace": ns,
}).Error("connecting to shim")
pid, _ := runc.ReadPidFile(filepath.Join(bundle.path, client.InitPidFile))
err := r.cleanupAfterDeadShim(ctx, bundle, ns, id, pid, nil)
if err != nil {
log.G(ctx).WithError(err).WithField("bundle", bundle.path).
@ -358,11 +358,13 @@ func (r *Runtime) loadTasks(ctx context.Context, ns string) ([]*Task, error) {
}
continue
}
o = append(o, &Task{
id: id,
shim: s,
namespace: ns,
})
t, err := newTask(id, ns, pid, s)
if err != nil {
log.G(ctx).WithError(err).Error("loading task type")
continue
}
o = append(o, t)
}
return o, nil
}

View File

@ -457,12 +457,12 @@ func (s *Service) Update(ctx context.Context, r *api.UpdateTaskRequest) (*google
return empty, nil
}
func (s *Service) Metrics(ctx context.Context, r *types.MetricsRequest) (*types.MetricsResponse, error) {
func (s *Service) Metrics(ctx context.Context, r *api.MetricsRequest) (*api.MetricsResponse, error) {
filter, err := filters.ParseAll(r.Filters...)
if err != nil {
return nil, err
}
var resp types.MetricsResponse
var resp api.MetricsResponse
for _, r := range s.runtimes {
tasks, err := r.Tasks(ctx)
if err != nil {
@ -473,7 +473,7 @@ func (s *Service) Metrics(ctx context.Context, r *types.MetricsRequest) (*types.
return &resp, nil
}
func getTasksMetrics(ctx context.Context, filter filters.Filter, tasks []runtime.Task, r *types.MetricsResponse) {
func getTasksMetrics(ctx context.Context, filter filters.Filter, tasks []runtime.Task, r *api.MetricsResponse) {
for _, tk := range tasks {
if !filter.Match(filters.AdapterFunc(func(fieldpath []string) (string, bool) {
t := tk

View File

@ -475,7 +475,7 @@ func (t *task) LoadProcess(ctx context.Context, id string, ioAttach IOAttach) (P
}
func (t *task) Metrics(ctx context.Context) (*types.Metric, error) {
response, err := t.client.TaskService().Metrics(ctx, &types.MetricsRequest{
response, err := t.client.TaskService().Metrics(ctx, &tasks.MetricsRequest{
Filters: []string{
"id==" + t.id,
},