/
orca.pb.go
293 lines (256 loc) · 11.5 KB
/
orca.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
// 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, 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