xds: add orca generated file, and move orca to xds folder (#2804)

This commit is contained in:
Menghan Li 2019-05-24 12:35:57 -07:00 коммит произвёл GitHub
Родитель b7325a3150
Коммит f34abd9513
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 459 добавлений и 469 удалений

Просмотреть файл

@ -6,6 +6,7 @@ package envoy_api_v2
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import duration "github.com/golang/protobuf/ptypes/duration"
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import discovery "google.golang.org/grpc/balancer/xds/internal/proto/envoy/api/v2/discovery"
@ -43,7 +44,7 @@ func (m *ClusterLoadAssignment) Reset() { *m = ClusterLoadAssignment{} }
func (m *ClusterLoadAssignment) String() string { return proto.CompactTextString(m) }
func (*ClusterLoadAssignment) ProtoMessage() {}
func (*ClusterLoadAssignment) Descriptor() ([]byte, []int) {
return fileDescriptor_eds_fb0a999149ff4153, []int{0}
return fileDescriptor_eds_1a80fb8e78974562, []int{0}
}
func (m *ClusterLoadAssignment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClusterLoadAssignment.Unmarshal(m, b)
@ -94,6 +95,7 @@ func (m *ClusterLoadAssignment) GetPolicy() *ClusterLoadAssignment_Policy {
type ClusterLoadAssignment_Policy struct {
DropOverloads []*ClusterLoadAssignment_Policy_DropOverload `protobuf:"bytes,2,rep,name=drop_overloads,json=dropOverloads,proto3" json:"drop_overloads,omitempty"`
OverprovisioningFactor *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=overprovisioning_factor,json=overprovisioningFactor,proto3" json:"overprovisioning_factor,omitempty"`
EndpointStaleAfter *duration.Duration `protobuf:"bytes,4,opt,name=endpoint_stale_after,json=endpointStaleAfter,proto3" json:"endpoint_stale_after,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -103,7 +105,7 @@ func (m *ClusterLoadAssignment_Policy) Reset() { *m = ClusterLoadAssignm
func (m *ClusterLoadAssignment_Policy) String() string { return proto.CompactTextString(m) }
func (*ClusterLoadAssignment_Policy) ProtoMessage() {}
func (*ClusterLoadAssignment_Policy) Descriptor() ([]byte, []int) {
return fileDescriptor_eds_fb0a999149ff4153, []int{0, 1}
return fileDescriptor_eds_1a80fb8e78974562, []int{0, 1}
}
func (m *ClusterLoadAssignment_Policy) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClusterLoadAssignment_Policy.Unmarshal(m, b)
@ -137,6 +139,13 @@ func (m *ClusterLoadAssignment_Policy) GetOverprovisioningFactor() *wrappers.UIn
return nil
}
func (m *ClusterLoadAssignment_Policy) GetEndpointStaleAfter() *duration.Duration {
if m != nil {
return m.EndpointStaleAfter
}
return nil
}
type ClusterLoadAssignment_Policy_DropOverload struct {
Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"`
DropPercentage *percent.FractionalPercent `protobuf:"bytes,2,opt,name=drop_percentage,json=dropPercentage,proto3" json:"drop_percentage,omitempty"`
@ -151,7 +160,7 @@ func (m *ClusterLoadAssignment_Policy_DropOverload) Reset() {
func (m *ClusterLoadAssignment_Policy_DropOverload) String() string { return proto.CompactTextString(m) }
func (*ClusterLoadAssignment_Policy_DropOverload) ProtoMessage() {}
func (*ClusterLoadAssignment_Policy_DropOverload) Descriptor() ([]byte, []int) {
return fileDescriptor_eds_fb0a999149ff4153, []int{0, 1, 0}
return fileDescriptor_eds_1a80fb8e78974562, []int{0, 1, 0}
}
func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload.Unmarshal(m, b)
@ -330,47 +339,50 @@ var _EndpointDiscoveryService_serviceDesc = grpc.ServiceDesc{
Metadata: "envoy/api/v2/eds.proto",
}
func init() { proto.RegisterFile("envoy/api/v2/eds.proto", fileDescriptor_eds_fb0a999149ff4153) }
func init() { proto.RegisterFile("envoy/api/v2/eds.proto", fileDescriptor_eds_1a80fb8e78974562) }
var fileDescriptor_eds_fb0a999149ff4153 = []byte{
// 612 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0xee, 0x3a, 0x6d, 0xd5, 0x6e, 0x43, 0x52, 0x2d, 0xa2, 0xb1, 0xac, 0xd0, 0x46, 0x11, 0x48,
0x51, 0x40, 0x36, 0x4a, 0x85, 0x8a, 0x72, 0x23, 0x34, 0x11, 0xa0, 0x08, 0x22, 0x57, 0x20, 0x4e,
0x84, 0x8d, 0xbd, 0x35, 0x2b, 0x9c, 0xdd, 0x65, 0xbd, 0x31, 0xf8, 0xc0, 0x85, 0x13, 0x77, 0xde,
0x86, 0x13, 0x6f, 0xc0, 0x81, 0x57, 0xe0, 0x82, 0xfa, 0x12, 0xc8, 0xbf, 0x89, 0x69, 0x2a, 0x71,
0xe0, 0xb6, 0xde, 0x99, 0xef, 0x9b, 0x6f, 0xbe, 0x9d, 0x31, 0x3c, 0x20, 0x2c, 0xe4, 0x91, 0x85,
0x05, 0xb5, 0xc2, 0x9e, 0x45, 0xdc, 0xc0, 0x14, 0x92, 0x2b, 0x8e, 0xaa, 0xc9, 0xbd, 0x89, 0x05,
0x35, 0xc3, 0x9e, 0xd1, 0x2c, 0x65, 0xb9, 0x34, 0x70, 0x78, 0x48, 0x64, 0x94, 0xe6, 0x1a, 0xb7,
0xca, 0x1c, 0xcc, 0x15, 0x9c, 0x32, 0x55, 0x1c, 0xb2, 0x2c, 0x3d, 0xcd, 0x52, 0x91, 0x20, 0x96,
0x20, 0xd2, 0x21, 0x45, 0xa4, 0xe9, 0x71, 0xee, 0xf9, 0x24, 0x21, 0xc0, 0x8c, 0x71, 0x85, 0x15,
0xe5, 0x2c, 0x53, 0x62, 0x34, 0x42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0x07, 0x82, 0xb3, 0x80, 0xb4, 0x37, 0x3a, 0xe0, 0x1e, 0x40,
0x0b, 0x58, 0x1b, 0x11, 0xe5, 0xbc, 0xfd, 0x8f, 0xc4, 0xed, 0xcf, 0x3f, 0x7f, 0x7d, 0xd5, 0x9a,
0xed, 0x46, 0xe9, 0x5f, 0xd3, 0x2f, 0x76, 0xa6, 0x0f, 0xba, 0x83, 0x3b, 0xd0, 0xa0, 0x3c, 0x25,
0x12, 0x92, 0x7f, 0x8c, 0x4a, 0x9c, 0x83, 0x9d, 0xa1, 0x1b, 0x4c, 0xe2, 0xc7, 0x9c, 0x80, 0x2f,
0x00, 0xcc, 0xb6, 0x93, 0x87, 0x3d, 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x56, 0x21, 0x69,
0xec, 0x04, 0x00, 0x00,
var fileDescriptor_eds_1a80fb8e78974562 = []byte{
// 665 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x4f, 0x6e, 0x13, 0x31,
0x14, 0xc6, 0xeb, 0x49, 0x1a, 0x52, 0x37, 0xb4, 0x95, 0x81, 0x76, 0x18, 0x85, 0x36, 0x8a, 0x40,
0xaa, 0x02, 0x9a, 0xa0, 0x54, 0xa8, 0xa8, 0xbb, 0x86, 0x36, 0x02, 0x54, 0x41, 0x34, 0x15, 0x08,
0x36, 0x04, 0x67, 0xc6, 0x0d, 0x16, 0x13, 0xdb, 0xd8, 0xce, 0xc0, 0x2c, 0xd8, 0xb0, 0x62, 0xcf,
0x2d, 0x7a, 0x04, 0x56, 0xac, 0xb8, 0x00, 0x57, 0x60, 0x83, 0xb8, 0x04, 0xf2, 0xfc, 0x6b, 0x87,
0xb6, 0x12, 0x0b, 0x76, 0x9e, 0x79, 0xef, 0xfd, 0xfc, 0xf9, 0x7b, 0xcf, 0x86, 0xab, 0x84, 0x45,
0x3c, 0xee, 0x62, 0x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01, 0x00, 0x00, 0xff,
0xff, 0x26, 0x36, 0x57, 0x86, 0x67, 0x05, 0x00, 0x00,
}

Просмотреть файл

@ -35,7 +35,7 @@ func (m *Endpoint) Reset() { *m = Endpoint{} }
func (m *Endpoint) String() string { return proto.CompactTextString(m) }
func (*Endpoint) ProtoMessage() {}
func (*Endpoint) Descriptor() ([]byte, []int) {
return fileDescriptor_endpoint_2d1a533d75f3064c, []int{0}
return fileDescriptor_endpoint_d432c656305d64c3, []int{0}
}
func (m *Endpoint) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Endpoint.Unmarshal(m, b)
@ -80,7 +80,7 @@ func (m *Endpoint_HealthCheckConfig) Reset() { *m = Endpoint_HealthCheck
func (m *Endpoint_HealthCheckConfig) String() string { return proto.CompactTextString(m) }
func (*Endpoint_HealthCheckConfig) ProtoMessage() {}
func (*Endpoint_HealthCheckConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_endpoint_2d1a533d75f3064c, []int{0, 0}
return fileDescriptor_endpoint_d432c656305d64c3, []int{0, 0}
}
func (m *Endpoint_HealthCheckConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Endpoint_HealthCheckConfig.Unmarshal(m, b)
@ -124,7 +124,7 @@ func (m *LbEndpoint) Reset() { *m = LbEndpoint{} }
func (m *LbEndpoint) String() string { return proto.CompactTextString(m) }
func (*LbEndpoint) ProtoMessage() {}
func (*LbEndpoint) Descriptor() ([]byte, []int) {
return fileDescriptor_endpoint_2d1a533d75f3064c, []int{1}
return fileDescriptor_endpoint_d432c656305d64c3, []int{1}
}
func (m *LbEndpoint) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LbEndpoint.Unmarshal(m, b)
@ -277,6 +277,7 @@ type LocalityLbEndpoints struct {
LbEndpoints []*LbEndpoint `protobuf:"bytes,2,rep,name=lb_endpoints,json=lbEndpoints,proto3" json:"lb_endpoints,omitempty"`
LoadBalancingWeight *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=load_balancing_weight,json=loadBalancingWeight,proto3" json:"load_balancing_weight,omitempty"`
Priority uint32 `protobuf:"varint,5,opt,name=priority,proto3" json:"priority,omitempty"`
Proximity *wrappers.UInt32Value `protobuf:"bytes,6,opt,name=proximity,proto3" json:"proximity,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -286,7 +287,7 @@ func (m *LocalityLbEndpoints) Reset() { *m = LocalityLbEndpoints{} }
func (m *LocalityLbEndpoints) String() string { return proto.CompactTextString(m) }
func (*LocalityLbEndpoints) ProtoMessage() {}
func (*LocalityLbEndpoints) Descriptor() ([]byte, []int) {
return fileDescriptor_endpoint_2d1a533d75f3064c, []int{2}
return fileDescriptor_endpoint_d432c656305d64c3, []int{2}
}
func (m *LocalityLbEndpoints) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LocalityLbEndpoints.Unmarshal(m, b)
@ -334,6 +335,13 @@ func (m *LocalityLbEndpoints) GetPriority() uint32 {
return 0
}
func (m *LocalityLbEndpoints) GetProximity() *wrappers.UInt32Value {
if m != nil {
return m.Proximity
}
return nil
}
func init() {
proto.RegisterType((*Endpoint)(nil), "envoy.api.v2.endpoint.Endpoint")
proto.RegisterType((*Endpoint_HealthCheckConfig)(nil), "envoy.api.v2.endpoint.Endpoint.HealthCheckConfig")
@ -342,44 +350,45 @@ func init() {
}
func init() {
proto.RegisterFile("envoy/api/v2/endpoint/endpoint.proto", fileDescriptor_endpoint_2d1a533d75f3064c)
proto.RegisterFile("envoy/api/v2/endpoint/endpoint.proto", fileDescriptor_endpoint_d432c656305d64c3)
}
var fileDescriptor_endpoint_2d1a533d75f3064c = []byte{
// 556 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xc1, 0x6e, 0xd3, 0x4c,
0x18, 0xac, 0xe3, 0xa6, 0x4d, 0x37, 0xc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, 0x8b, 0x37, 0x83, 0xd5, 0x9b, 0xc1, 0x1f, 0xdf, 0x46,
0xe2, 0x68, 0x24, 0x0b, 0xb3, 0x5b, 0x79, 0x91, 0xdb, 0xc3, 0xba, 0x79, 0xa1, 0x0d, 0x34, 0xd2,
0xcd, 0x07, 0xd9, 0x6a, 0xce, 0x67, 0x39, 0xc6, 0xee, 0xa0, 0xff, 0x03, 0x9e, 0x0a, 0x87, 0xf9,
0x34, 0x12, 0x6c, 0xc2, 0x68, 0xd2, 0xff, 0x51, 0x43, 0xdd, 0x53, 0xee, 0x41, 0xc8, 0xc4, 0xe2,
0xba, 0x6e, 0x99, 0x21, 0x2c, 0xaf, 0xcb, 0xbe, 0xd7, 0x65, 0x50, 0x4a, 0x52, 0x91, 0x8d, 0x13,
0xd4, 0x0a, 0x5d, 0x47, 0xb5, 0x9a, 0x37, 0xa8, 0x0f, 0x9a, 0xa3, 0x87, 0x77, 0xfc, 0xac, 0xeb,
0x95, 0xa4, 0x19, 0x2e, 0xad, 0xbf, 0xb3, 0x09, 0xfd, 0x9f, 0x34, 0x61, 0x3c, 0x41, 0x8d, 0x38,
0x61, 0x3c, 0xc9, 0xe3, 0xd5, 0xe5, 0x3b, 0x44, 0xb9, 0xa8, 0x3e, 0xd4, 0xcd, 0x0b, 0x8d, 0x54,
0x98, 0xfd, 0x0a, 0x3d, 0x62, 0xbc, 0xf0, 0x1e, 0x27, 0xfc, 0xfb, 0x62, 0x7d, 0x0c, 0xbb, 0xad,
0x9c, 0x9f, 0xe5, 0x7e, 0xce, 0xb4, 0x2f, 0xd5, 0xcb, 0x73, 0xb7, 0xa4, 0xc5, 0xa3, 0x3f, 0x01,
0x00, 0x00, 0xff, 0xff, 0x6b, 0xdf, 0xf4, 0xe1, 0x92, 0x04, 0x00, 0x00,
var fileDescriptor_endpoint_d432c656305d64c3 = []byte{
// 571 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,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x64, 0xf8, 0xa2, 0xce, 0x04, 0x00, 0x00,
}

Просмотреть файл

@ -0,0 +1,116 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/data/orca/v1/orca_load_report.proto
package v1
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type OrcaLoadReport struct {
CpuUtilization float64 `protobuf:"fixed64,1,opt,name=cpu_utilization,json=cpuUtilization,proto3" json:"cpu_utilization,omitempty"`
MemUtilization float64 `protobuf:"fixed64,2,opt,name=mem_utilization,json=memUtilization,proto3" json:"mem_utilization,omitempty"`
Rps uint64 `protobuf:"varint,3,opt,name=rps,proto3" json:"rps,omitempty"`
RequestCostOrUtilization map[string]float64 `protobuf:"bytes,4,rep,name=request_cost_or_utilization,json=requestCostOrUtilization,proto3" json:"request_cost_or_utilization,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OrcaLoadReport) Reset() { *m = OrcaLoadReport{} }
func (m *OrcaLoadReport) String() string { return proto.CompactTextString(m) }
func (*OrcaLoadReport) ProtoMessage() {}
func (*OrcaLoadReport) Descriptor() ([]byte, []int) {
return fileDescriptor_orca_load_report_21c84c96f77315d6, []int{0}
}
func (m *OrcaLoadReport) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OrcaLoadReport.Unmarshal(m, b)
}
func (m *OrcaLoadReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_OrcaLoadReport.Marshal(b, m, deterministic)
}
func (dst *OrcaLoadReport) XXX_Merge(src proto.Message) {
xxx_messageInfo_OrcaLoadReport.Merge(dst, src)
}
func (m *OrcaLoadReport) XXX_Size() int {
return xxx_messageInfo_OrcaLoadReport.Size(m)
}
func (m *OrcaLoadReport) XXX_DiscardUnknown() {
xxx_messageInfo_OrcaLoadReport.DiscardUnknown(m)
}
var xxx_messageInfo_OrcaLoadReport proto.InternalMessageInfo
func (m *OrcaLoadReport) GetCpuUtilization() float64 {
if m != nil {
return m.CpuUtilization
}
return 0
}
func (m *OrcaLoadReport) GetMemUtilization() float64 {
if m != nil {
return m.MemUtilization
}
return 0
}
func (m *OrcaLoadReport) GetRps() uint64 {
if m != nil {
return m.Rps
}
return 0
}
func (m *OrcaLoadReport) GetRequestCostOrUtilization() map[string]float64 {
if m != nil {
return m.RequestCostOrUtilization
}
return nil
}
func init() {
proto.RegisterType((*OrcaLoadReport)(nil), "udpa.data.orca.v1.OrcaLoadReport")
proto.RegisterMapType((map[string]float64)(nil), "udpa.data.orca.v1.OrcaLoadReport.RequestCostOrUtilizationEntry")
}
func init() {
proto.RegisterFile("udpa/data/orca/v1/orca_load_report.proto", fileDescriptor_orca_load_report_21c84c96f77315d6)
}
var fileDescriptor_orca_load_report_21c84c96f77315d6 = []byte{
// 321 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0xc3, 0x30,
0x14, 0xc7, 0xed, 0x3a, 0x85, 0x65, 0x30, 0xb5, 0x0a, 0xce, 0x89, 0x58, 0x3c, 0xd5, 0x4b, 0xca,
0xf4, 0x22, 0x22, 0x0c, 0x26, 0x1e, 0x44, 0x61, 0x23, 0xe0, 0xc5, 0x4b, 0x89, 0x6d, 0x0e, 0xc5,
0x76, 0x2f, 0xbe, 0x26, 0xc1, 0x7a, 0xf0, 0xe6, 0x97, 0xf2, 0xe4, 0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, 0x9e, 0x07, 0xd7, 0x64, 0xff, 0xcf, 0x52, 0x3b, 0xf2, 0x83, 0x28,
0x2b, 0xf3, 0x3a, 0xcc, 0x86, 0xde, 0x36, 0x59, 0x35, 0x3c, 0xd3, 0xa2, 0x76, 0x81, 0xd5, 0xc9,
0x59, 0xeb, 0xd4, 0x19, 0x9f, 0x93, 0x83, 0x14, 0xa8, 0x98, 0x19, 0x28, 0x25, 0xc2, 0x53, 0xb9,
0x3c, 0xf6, 0x78, 0xab, 0x39, 0xf7, 0xd4, 0xee, 0x6f, 0xea, 0xdc, 0xb5, 0xcc, 0xf0, 0x7e, 0xad,
0x5a, 0xe6, 0xc9, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x1a, 0xcf, 0x42, 0x24, 0x02, 0x00,
0x00,
}

Просмотреть файл

@ -0,0 +1,203 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/service/orca/v1/orca.proto
package v1
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import duration "github.com/golang/protobuf/ptypes/duration"
import orca_load_report "google.golang.org/grpc/balancer/xds/internal/proto/udpa/data/orca/v1/orca_load_report"
import _ "google.golang.org/grpc/balancer/xds/internal/proto/validate"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type OrcaLoadReportRequest struct {
ReportInterval *duration.Duration `protobuf:"bytes,1,opt,name=report_interval,json=reportInterval,proto3" json:"report_interval,omitempty"`
RequestCostNames []string `protobuf:"bytes,2,rep,name=request_cost_names,json=requestCostNames,proto3" json:"request_cost_names,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OrcaLoadReportRequest) Reset() { *m = OrcaLoadReportRequest{} }
func (m *OrcaLoadReportRequest) String() string { return proto.CompactTextString(m) }
func (*OrcaLoadReportRequest) ProtoMessage() {}
func (*OrcaLoadReportRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_orca_ca77e509304795c3, []int{0}
}
func (m *OrcaLoadReportRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OrcaLoadReportRequest.Unmarshal(m, b)
}
func (m *OrcaLoadReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_OrcaLoadReportRequest.Marshal(b, m, deterministic)
}
func (dst *OrcaLoadReportRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_OrcaLoadReportRequest.Merge(dst, src)
}
func (m *OrcaLoadReportRequest) XXX_Size() int {
return xxx_messageInfo_OrcaLoadReportRequest.Size(m)
}
func (m *OrcaLoadReportRequest) XXX_DiscardUnknown() {
xxx_messageInfo_OrcaLoadReportRequest.DiscardUnknown(m)
}
var xxx_messageInfo_OrcaLoadReportRequest proto.InternalMessageInfo
func (m *OrcaLoadReportRequest) GetReportInterval() *duration.Duration {
if m != nil {
return m.ReportInterval
}
return nil
}
func (m *OrcaLoadReportRequest) GetRequestCostNames() []string {
if m != nil {
return m.RequestCostNames
}
return nil
}
func init() {
proto.RegisterType((*OrcaLoadReportRequest)(nil), "udpa.service.orca.v1.OrcaLoadReportRequest")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// OpenRcaServiceClient is the client API for OpenRcaService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OpenRcaServiceClient interface {
StreamCoreMetrics(ctx context.Context, in *OrcaLoadReportRequest, opts ...grpc.CallOption) (OpenRcaService_StreamCoreMetricsClient, error)
}
type openRcaServiceClient struct {
cc *grpc.ClientConn
}
func NewOpenRcaServiceClient(cc *grpc.ClientConn) OpenRcaServiceClient {
return &openRcaServiceClient{cc}
}
func (c *openRcaServiceClient) StreamCoreMetrics(ctx context.Context, in *OrcaLoadReportRequest, opts ...grpc.CallOption) (OpenRcaService_StreamCoreMetricsClient, error) {
stream, err := c.cc.NewStream(ctx, &_OpenRcaService_serviceDesc.Streams[0], "/udpa.service.orca.v1.OpenRcaService/StreamCoreMetrics", opts...)
if err != nil {
return nil, err
}
x := &openRcaServiceStreamCoreMetricsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type OpenRcaService_StreamCoreMetricsClient interface {
Recv() (*orca_load_report.OrcaLoadReport, error)
grpc.ClientStream
}
type openRcaServiceStreamCoreMetricsClient struct {
grpc.ClientStream
}
func (x *openRcaServiceStreamCoreMetricsClient) Recv() (*orca_load_report.OrcaLoadReport, error) {
m := new(orca_load_report.OrcaLoadReport)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// OpenRcaServiceServer is the server API for OpenRcaService service.
type OpenRcaServiceServer interface {
StreamCoreMetrics(*OrcaLoadReportRequest, OpenRcaService_StreamCoreMetricsServer) error
}
func RegisterOpenRcaServiceServer(s *grpc.Server, srv OpenRcaServiceServer) {
s.RegisterService(&_OpenRcaService_serviceDesc, srv)
}
func _OpenRcaService_StreamCoreMetrics_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(OrcaLoadReportRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(OpenRcaServiceServer).StreamCoreMetrics(m, &openRcaServiceStreamCoreMetricsServer{stream})
}
type OpenRcaService_StreamCoreMetricsServer interface {
Send(*orca_load_report.OrcaLoadReport) error
grpc.ServerStream
}
type openRcaServiceStreamCoreMetricsServer struct {
grpc.ServerStream
}
func (x *openRcaServiceStreamCoreMetricsServer) Send(m *orca_load_report.OrcaLoadReport) error {
return x.ServerStream.SendMsg(m)
}
var _OpenRcaService_serviceDesc = grpc.ServiceDesc{
ServiceName: "udpa.service.orca.v1.OpenRcaService",
HandlerType: (*OpenRcaServiceServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "StreamCoreMetrics",
Handler: _OpenRcaService_StreamCoreMetrics_Handler,
ServerStreams: true,
},
},
Metadata: "udpa/service/orca/v1/orca.proto",
}
func init() {
proto.RegisterFile("udpa/service/orca/v1/orca.proto", fileDescriptor_orca_ca77e509304795c3)
}
var fileDescriptor_orca_ca77e509304795c3 = []byte{
// 300 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x4f, 0x4b, 0xc3, 0x40,
0x10, 0xc5, 0x49, 0x05, 0xa1, 0x2b, 0x54, 0x0d, 0x8a, 0xb5, 0x07, 0xad, 0x3d, 0x15, 0x94, 0x8d,
0xad, 0xf8, 0x05, 0x5a, 0x2f, 0x82, 0xda, 0x92, 0xde, 0xbc, 0x84, 0x69, 0x32, 0x96, 0x85, 0x34,
0x13, 0x67, 0x37, 0xab, 0xfd, 0x08, 0x7e, 0x6b, 0xc9, 0x6e, 0x7a, 0x10, 0xe2, 0x69, 0xff, 0xbc,
0xf7, 0x9b, 0xc7, 0x3c, 0x71, 0x5d, 0x65, 0x25, 0x44, 0x1a, 0xd9, 0xaa, 0x14, 0x23, 0xe2, 0x14,
0x22, 0x3b, 0x71, 0xa7, 0x2c, 0x99, 0x0c, 0x85, 0x67, 0xb5, 0x41, 0x36, 0x06, 0xe9, 0x04, 0x3b,
0x19, 0x8c, 0x1d, 0x96, 0x81, 0x81, 0x3f, 0x4c, 0x92, 0x13, 0x64, 0x09, 0x63, 0x49, 0x6c, 0x3c,
0x3f, 0xb8, 0xda, 0x10, 0x6d, 0x72, 0x8c, 0xdc, 0x6b, 0x5d, 0x7d, 0x44, 0x59, 0xc5, 0x60, 0x14,
0x15, 0x8d, 0x7e, 0x61, 0x21, 0x57, 0x19, 0x18, 0x8c, 0xf6, 0x17, 0x2f, 0x8c, 0x7e, 0x02, 0x71,
0xbe, 0xe0, 0x14, 0x5e, 0x08, 0xb2, 0xd8, 0x4d, 0x8c, 0xf1, 0xb3, 0x42, 0x6d, 0xc2, 0x99, 0x38,
0xf6, 0x11, 0x89, 0x2a, 0x0c, 0xb2, 0x85, 0xbc, 0x1f, 0x0c, 0x83, 0xf1, 0xd1, 0xf4, 0x52, 0xfa,
0x30, 0xb9, 0x0f, 0x93, 0x4f, 0x4d, 0x58, 0xdc, 0xf3, 0xc4, 0x73, 0x03, 0x84, 0x77, 0x22, 0x64,
0x3f, 0x2e, 0x49, 0x49, 0x9b, 0xa4, 0x80, 0x2d, 0xea, 0x7e, 0x67, 0x78, 0x30, 0xee, 0xc6, 0x27,
0x8d, 0x32, 0x27, 0x6d, 0xde, 0xea, 0xff, 0xe9, 0x97, 0xe8, 0x2d, 0x4a, 0x2c, 0xe2, 0x14, 0x56,
0xbe, 0x88, 0x10, 0xc5, 0xe9, 0xca, 0x30, 0xc2, 0x76, 0x4e, 0x8c, 0xaf, 0x68, 0x58, 0xa5, 0x3a,
0xbc, 0x95, 0x6d, 0x65, 0xc9, 0xd6, 0x2d, 0x06, 0x37, 0xde, 0x5c, 0x77, 0xf8, 0x8f, 0xf3, 0x3e,
0x98, 0x3d, 0x8a, 0x91, 0x22, 0x89, 0x85, 0xa5, 0x5d, 0xc9, 0xf4, 0xbd, 0x6b, 0x0d, 0x98, 0x75,
0x6b, 0x6e, 0x59, 0xef, 0xbc, 0x0c, 0xde, 0x3b, 0x76, 0xb2, 0x3e, 0x74, 0x05, 0x3c, 0xfc, 0x06,
0x00, 0x00, 0xff, 0xff, 0xac, 0x32, 0x62, 0x96, 0xde, 0x01, 0x00, 0x00,
}

Просмотреть файл

@ -14,23 +14,21 @@
* limitations under the License.
*/
//go:generate protoc -I ./orca_v1 --go_out=plugins=grpc:./orca_v1 ./orca_v1/orca.proto
// Package orca implements Open Request Cost Aggregation.
package orca
import (
"github.com/golang/protobuf/proto"
orcapb "google.golang.org/grpc/balancer/xds/internal/proto/udpa/data/orca/v1/orca_load_report"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/internal/balancerload"
orcapb "google.golang.org/grpc/internal/balancerload/orca/orca_v1"
"google.golang.org/grpc/metadata"
)
const mdKey = "X-Endpoint-Load-Metrics-Bin"
// toBytes converts a orca load report into bytes.
func toBytes(r *orcapb.LoadReport) []byte {
func toBytes(r *orcapb.OrcaLoadReport) []byte {
if r == nil {
return nil
}
@ -44,7 +42,7 @@ func toBytes(r *orcapb.LoadReport) []byte {
}
// ToMetadata converts a orca load report into grpc metadata.
func ToMetadata(r *orcapb.LoadReport) metadata.MD {
func ToMetadata(r *orcapb.OrcaLoadReport) metadata.MD {
b := toBytes(r)
if b == nil {
return nil
@ -53,8 +51,8 @@ func ToMetadata(r *orcapb.LoadReport) metadata.MD {
}
// fromBytes reads load report bytes and converts it to orca.
func fromBytes(b []byte) *orcapb.LoadReport {
ret := new(orcapb.LoadReport)
func fromBytes(b []byte) *orcapb.OrcaLoadReport {
ret := new(orcapb.OrcaLoadReport)
if err := proto.Unmarshal(b, ret); err != nil {
grpclog.Warningf("orca: failed to unmarshal load report: %v", err)
return nil
@ -65,7 +63,7 @@ func fromBytes(b []byte) *orcapb.LoadReport {
// FromMetadata reads load report from metadata and converts it to orca.
//
// It returns nil if report is not found in metadata.
func FromMetadata(md metadata.MD) *orcapb.LoadReport {
func FromMetadata(md metadata.MD) *orcapb.OrcaLoadReport {
vs := md.Get(mdKey)
if len(vs) == 0 {
return nil

Просмотреть файл

@ -22,16 +22,14 @@ import (
"testing"
"github.com/golang/protobuf/proto"
"google.golang.org/grpc/internal/balancerload/orca/orca_v1"
orcapb "google.golang.org/grpc/balancer/xds/internal/proto/udpa/data/orca/v1/orca_load_report"
"google.golang.org/grpc/metadata"
)
var (
testMessage = &orca_v1.LoadReport{
testMessage = &orcapb.OrcaLoadReport{
CpuUtilization: 0.1,
MemUtilization: 0.2,
NicInUtilization: 0,
NicOutUtilization: 0,
RequestCostOrUtilization: map[string]float64{"ttt": 0.4},
}
testBytes, _ = proto.Marshal(testMessage)
@ -40,7 +38,7 @@ var (
func TestToMetadata(t *testing.T) {
tests := []struct {
name string
r *orca_v1.LoadReport
r *orcapb.OrcaLoadReport
want metadata.MD
}{{
name: "nil",
@ -66,7 +64,7 @@ func TestFromMetadata(t *testing.T) {
tests := []struct {
name string
md metadata.MD
want *orca_v1.LoadReport
want *orcapb.OrcaLoadReport
}{{
name: "nil",
md: nil,

Просмотреть файл

@ -1,293 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: orca.proto
package orca_v1
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import duration "github.com/golang/protobuf/ptypes/duration"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type LoadReport struct {
// CPU utilization expressed as a fraction of available CPU resources. This
// should be derived from a sample or measurement taken during the request.
CpuUtilization float64 `protobuf:"fixed64,1,opt,name=cpu_utilization,json=cpuUtilization,proto3" json:"cpu_utilization,omitempty"`
// Memory utilization expressed as a fraction of available memory
// resources. This should be derived from a sample or measurement taken
// during the request.
MemUtilization float64 `protobuf:"fixed64,2,opt,name=mem_utilization,json=memUtilization,proto3" json:"mem_utilization,omitempty"`
// NIC inbound/outbound utilization expressed as a fraction of available NIC
// bandwidth. The request in/out bytes can be inferred by Envoy, but not the
// NIC availability at the endpoint, hence reporting
NicInUtilization float64 `protobuf:"fixed64,3,opt,name=nic_in_utilization,json=nicInUtilization,proto3" json:"nic_in_utilization,omitempty"`
NicOutUtilization float64 `protobuf:"fixed64,4,opt,name=nic_out_utilization,json=nicOutUtilization,proto3" json:"nic_out_utilization,omitempty"`
// Application specific requests costs. Values may be absolute costs (e.g.
// 3487 bytes of storage) associated with the cost or utilization,
// expressed as a fraction of total resources available. Utilization
// metrics should be derived from a sample or measurement taken
// during the request.
RequestCostOrUtilization map[string]float64 `protobuf:"bytes,5,rep,name=request_cost_or_utilization,json=requestCostOrUtilization,proto3" json:"request_cost_or_utilization,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LoadReport) Reset() { *m = LoadReport{} }
func (m *LoadReport) String() string { return proto.CompactTextString(m) }
func (*LoadReport) ProtoMessage() {}
func (*LoadReport) Descriptor() ([]byte, []int) {
return fileDescriptor_orca_542539e3bf435293, []int{0}
}
func (m *LoadReport) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LoadReport.Unmarshal(m, b)
}
func (m *LoadReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LoadReport.Marshal(b, m, deterministic)
}
func (dst *LoadReport) XXX_Merge(src proto.Message) {
xxx_messageInfo_LoadReport.Merge(dst, src)
}
func (m *LoadReport) XXX_Size() int {
return xxx_messageInfo_LoadReport.Size(m)
}
func (m *LoadReport) XXX_DiscardUnknown() {
xxx_messageInfo_LoadReport.DiscardUnknown(m)
}
var xxx_messageInfo_LoadReport proto.InternalMessageInfo
func (m *LoadReport) GetCpuUtilization() float64 {
if m != nil {
return m.CpuUtilization
}
return 0
}
func (m *LoadReport) GetMemUtilization() float64 {
if m != nil {
return m.MemUtilization
}
return 0
}
func (m *LoadReport) GetNicInUtilization() float64 {
if m != nil {
return m.NicInUtilization
}
return 0
}
func (m *LoadReport) GetNicOutUtilization() float64 {
if m != nil {
return m.NicOutUtilization
}
return 0
}
func (m *LoadReport) GetRequestCostOrUtilization() map[string]float64 {
if m != nil {
return m.RequestCostOrUtilization
}
return nil
}
type LoadReportRequest struct {
// Interval for generating Open RCA core metric responses.
ReportInterval *duration.Duration `protobuf:"bytes,1,opt,name=report_interval,json=reportInterval,proto3" json:"report_interval,omitempty"`
// Request costs to collect. If this is empty, all known requests costs tracked by
// the load reporting agent will be returned. This provides an opportunity for
// the client to selectively obtain a subset of tracked costs.
RequestCostNames []string `protobuf:"bytes,2,rep,name=request_cost_names,json=requestCostNames,proto3" json:"request_cost_names,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LoadReportRequest) Reset() { *m = LoadReportRequest{} }
func (m *LoadReportRequest) String() string { return proto.CompactTextString(m) }
func (*LoadReportRequest) ProtoMessage() {}
func (*LoadReportRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_orca_542539e3bf435293, []int{1}
}
func (m *LoadReportRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LoadReportRequest.Unmarshal(m, b)
}
func (m *LoadReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LoadReportRequest.Marshal(b, m, deterministic)
}
func (dst *LoadReportRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_LoadReportRequest.Merge(dst, src)
}
func (m *LoadReportRequest) XXX_Size() int {
return xxx_messageInfo_LoadReportRequest.Size(m)
}
func (m *LoadReportRequest) XXX_DiscardUnknown() {
xxx_messageInfo_LoadReportRequest.DiscardUnknown(m)
}
var xxx_messageInfo_LoadReportRequest proto.InternalMessageInfo
func (m *LoadReportRequest) GetReportInterval() *duration.Duration {
if m != nil {
return m.ReportInterval
}
return nil
}
func (m *LoadReportRequest) GetRequestCostNames() []string {
if m != nil {
return m.RequestCostNames
}
return nil
}
func init() {
proto.RegisterType((*LoadReport)(nil), "orca.v1.LoadReport")
proto.RegisterMapType((map[string]float64)(nil), "orca.v1.LoadReport.RequestCostOrUtilizationEntry")
proto.RegisterType((*LoadReportRequest)(nil), "orca.v1.LoadReportRequest")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// OpenRCAServiceClient is the client API for OpenRCAService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OpenRCAServiceClient interface {
StreamCoreMetrics(ctx context.Context, in *LoadReportRequest, opts ...grpc.CallOption) (OpenRCAService_StreamCoreMetricsClient, error)
}
type openRCAServiceClient struct {
cc *grpc.ClientConn
}
func NewOpenRCAServiceClient(cc *grpc.ClientConn) OpenRCAServiceClient {
return &openRCAServiceClient{cc}
}
func (c *openRCAServiceClient) StreamCoreMetrics(ctx context.Context, in *LoadReportRequest, opts ...grpc.CallOption) (OpenRCAService_StreamCoreMetricsClient, error) {
stream, err := c.cc.NewStream(ctx, &_OpenRCAService_serviceDesc.Streams[0], "/orca.v1.OpenRCAService/StreamCoreMetrics", opts...)
if err != nil {
return nil, err
}
x := &openRCAServiceStreamCoreMetricsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type OpenRCAService_StreamCoreMetricsClient interface {
Recv() (*LoadReport, error)
grpc.ClientStream
}
type openRCAServiceStreamCoreMetricsClient struct {
grpc.ClientStream
}
func (x *openRCAServiceStreamCoreMetricsClient) Recv() (*LoadReport, error) {
m := new(LoadReport)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// OpenRCAServiceServer is the server API for OpenRCAService service.
type OpenRCAServiceServer interface {
StreamCoreMetrics(*LoadReportRequest, OpenRCAService_StreamCoreMetricsServer) error
}
func RegisterOpenRCAServiceServer(s *grpc.Server, srv OpenRCAServiceServer) {
s.RegisterService(&_OpenRCAService_serviceDesc, srv)
}
func _OpenRCAService_StreamCoreMetrics_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(LoadReportRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(OpenRCAServiceServer).StreamCoreMetrics(m, &openRCAServiceStreamCoreMetricsServer{stream})
}
type OpenRCAService_StreamCoreMetricsServer interface {
Send(*LoadReport) error
grpc.ServerStream
}
type openRCAServiceStreamCoreMetricsServer struct {
grpc.ServerStream
}
func (x *openRCAServiceStreamCoreMetricsServer) Send(m *LoadReport) error {
return x.ServerStream.SendMsg(m)
}
var _OpenRCAService_serviceDesc = grpc.ServiceDesc{
ServiceName: "orca.v1.OpenRCAService",
HandlerType: (*OpenRCAServiceServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "StreamCoreMetrics",
Handler: _OpenRCAService_StreamCoreMetrics_Handler,
ServerStreams: true,
},
},
Metadata: "orca.proto",
}
func init() { proto.RegisterFile("orca.proto", fileDescriptor_orca_542539e3bf435293) }
var fileDescriptor_orca_542539e3bf435293 = []byte{
// 373 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xcd, 0x6b, 0xe3, 0x30,
0x10, 0xc5, 0xd7, 0xf6, 0x66, 0x97, 0x28, 0x90, 0x0f, 0x65, 0x0f, 0x59, 0x2f, 0xbb, 0x84, 0x5c,
0x36, 0x87, 0x45, 0xd9, 0xa4, 0x97, 0xd2, 0x5b, 0x9b, 0x16, 0x1a, 0xfa, 0x11, 0x50, 0xe8, 0xa5,
0x17, 0xe3, 0x28, 0xd3, 0x20, 0x6a, 0x4b, 0xae, 0x2c, 0x19, 0xd2, 0x7b, 0xff, 0xea, 0x5e, 0x8a,
0x65, 0x97, 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0x32, 0xa1, 0xe2, 0x73, 0xe2, 0x1e, 0x3b,
0xa3, 0x17, 0x07, 0xf5, 0xf6, 0x33, 0x95, 0x7d, 0xf1, 0x19, 0xea, 0x28, 0x2b, 0x04, 0x5c, 0x68,
0x50, 0x59, 0x18, 0xd9, 0x6e, 0xad, 0xd9, 0x4f, 0x52, 0x5c, 0x93, 0xbc, 0x5f, 0x93, 0x9c, 0x97,
0xd7, 0xa4, 0xed, 0xc2, 0xb1, 0x28, 0x0d, 0x79, 0xec, 0xb5, 0x60, 0x44, 0x18, 0x43, 0x3a, 0x70,
0x87, 0xde, 0xb8, 0x49, 0xbb, 0x95, 0xe5, 0x6e, 0x73, 0x7d, 0x76, 0x8f, 0xda, 0xcb, 0x04, 0x04,
0x9d, 0x9f, 0xae, 0x40, 0x65, 0x9c, 0x01, 0xbe, 0x44, 0xbd, 0x95, 0x56, 0x10, 0xc6, 0x73, 0xa9,
0xe0, 0x06, 0xb4, 0xe2, 0x2c, 0xc5, 0xfe, 0x81, 0x20, 0xcb, 0xa1, 0xfd, 0xfe, 0x81, 0xda, 0xe8,
0xcb, 0x7f, 0x67, 0xfd, 0xcd, 0x0e, 0x7b, 0xf4, 0x16, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xda, 0x2d,
0xb7, 0x9f, 0x02, 0x00, 0x00,
}

Просмотреть файл

@ -1,60 +0,0 @@
/*
* Copyright 2019 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto3";
package orca.v1;
import "google/protobuf/duration.proto";
message LoadReport {
// CPU utilization expressed as a fraction of available CPU resources. This
// should be derived from a sample or measurement taken during the request.
double cpu_utilization = 1;
// Memory utilization expressed as a fraction of available memory
// resources. This should be derived from a sample or measurement taken
// during the request.
double mem_utilization = 2;
// NIC inbound/outbound utilization expressed as a fraction of available NIC
// bandwidth. The request in/out bytes can be inferred by Envoy, but not the
// NIC availability at the endpoint, hence reporting
double nic_in_utilization = 3;
double nic_out_utilization = 4;
// Application specific requests costs. Values may be absolute costs (e.g.
// 3487 bytes of storage) associated with the cost or utilization,
// expressed as a fraction of total resources available. Utilization
// metrics should be derived from a sample or measurement taken
// during the request.
map<string, double> request_cost_or_utilization = 5;
}
message LoadReportRequest {
// Interval for generating Open RCA core metric responses.
google.protobuf.Duration report_interval = 1;
// Request costs to collect. If this is empty, all known requests costs tracked by
// the load reporting agent will be returned. This provides an opportunity for
// the client to selectively obtain a subset of tracked costs.
repeated string request_cost_names = 2;
}
service OpenRCAService {
rpc StreamCoreMetrics(LoadReportRequest) returns (stream LoadReport) {
}
}

Просмотреть файл

@ -24,19 +24,16 @@ import (
"testing"
"time"
"github.com/golang/protobuf/proto"
"google.golang.org/grpc"
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/connectivity"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/internal/balancerload/orca"
orcapb "google.golang.org/grpc/internal/balancerload/orca/orca_v1"
"google.golang.org/grpc/internal/balancerload"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/resolver"
testpb "google.golang.org/grpc/test/grpc_testing"
"google.golang.org/grpc/testdata"
_ "google.golang.org/grpc/internal/balancerload/orca"
)
const testBalancerName = "testbalancer"
@ -200,6 +197,22 @@ func testDoneInfo(t *testing.T, e env) {
}
}
const loadMDKey = "X-Endpoint-Load-Metrics-Bin"
type testLoadParser struct{}
func (*testLoadParser) Parse(md metadata.MD) interface{} {
vs := md.Get(loadMDKey)
if len(vs) == 0 {
return nil
}
return vs[0]
}
func init() {
balancerload.SetParser(&testLoadParser{})
}
func (s) TestDoneLoads(t *testing.T) {
for _, e := range listTestEnv() {
testDoneLoads(t, e)
@ -210,17 +223,11 @@ func testDoneLoads(t *testing.T, e env) {
b := &testBalancer{}
balancer.Register(b)
testLoad := &orcapb.LoadReport{
CpuUtilization: 0.31,
MemUtilization: 0.41,
NicInUtilization: 0.59,
NicOutUtilization: 0.26,
RequestCostOrUtilization: nil,
}
const testLoad = "test-load-,-should-be-orca"
ss := &stubServer{
emptyCall: func(ctx context.Context, in *testpb.Empty) (*testpb.Empty, error) {
grpc.SetTrailer(ctx, orca.ToMetadata(testLoad))
grpc.SetTrailer(ctx, metadata.Pairs(loadMDKey, testLoad))
return &testpb.Empty{}, nil
},
}
@ -247,8 +254,8 @@ func testDoneLoads(t *testing.T, e env) {
if len(b.doneInfo) < 1 {
t.Fatalf("b.doneInfo = %v, want length 1", b.doneInfo)
}
gotLoad, _ := b.doneInfo[0].ServerLoad.(*orcapb.LoadReport)
if !proto.Equal(gotLoad, testLoad) {
gotLoad, _ := b.doneInfo[0].ServerLoad.(string)
if gotLoad != testLoad {
t.Fatalf("b.doneInfo[0].ServerLoad = %v; want = %v", b.doneInfo[0].ServerLoad, testLoad)
}
}