-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschedmessages.pb.go
436 lines (392 loc) · 13.9 KB
/
schedmessages.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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: schedmessages.proto
package schedulers
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// 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 Quotum struct {
ProjectRatio float32 `protobuf:"fixed32,1,opt,name=ProjectRatio" json:"ProjectRatio,omitempty"`
// Types that are valid to be assigned to Q:
// *Quotum_CpuHoursRatio
// *Quotum_CpuHoursAbs
// *Quotum_RamHoursAbs
// *Quotum_RamHoursRatio
Q isQuotum_Q `protobuf_oneof:"Q"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Quotum) Reset() { *m = Quotum{} }
func (m *Quotum) String() string { return proto.CompactTextString(m) }
func (*Quotum) ProtoMessage() {}
func (*Quotum) Descriptor() ([]byte, []int) {
return fileDescriptor_schedmessages_885d9f7d21732d74, []int{0}
}
func (m *Quotum) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Quotum.Unmarshal(m, b)
}
func (m *Quotum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Quotum.Marshal(b, m, deterministic)
}
func (dst *Quotum) XXX_Merge(src proto.Message) {
xxx_messageInfo_Quotum.Merge(dst, src)
}
func (m *Quotum) XXX_Size() int {
return xxx_messageInfo_Quotum.Size(m)
}
func (m *Quotum) XXX_DiscardUnknown() {
xxx_messageInfo_Quotum.DiscardUnknown(m)
}
var xxx_messageInfo_Quotum proto.InternalMessageInfo
type isQuotum_Q interface {
isQuotum_Q()
}
type Quotum_CpuHoursRatio struct {
CpuHoursRatio float32 `protobuf:"fixed32,10,opt,name=CpuHoursRatio,oneof"`
}
type Quotum_CpuHoursAbs struct {
CpuHoursAbs float32 `protobuf:"fixed32,11,opt,name=CpuHoursAbs,oneof"`
}
type Quotum_RamHoursAbs struct {
RamHoursAbs float32 `protobuf:"fixed32,12,opt,name=RamHoursAbs,oneof"`
}
type Quotum_RamHoursRatio struct {
RamHoursRatio float32 `protobuf:"fixed32,13,opt,name=RamHoursRatio,oneof"`
}
func (*Quotum_CpuHoursRatio) isQuotum_Q() {}
func (*Quotum_CpuHoursAbs) isQuotum_Q() {}
func (*Quotum_RamHoursAbs) isQuotum_Q() {}
func (*Quotum_RamHoursRatio) isQuotum_Q() {}
func (m *Quotum) GetQ() isQuotum_Q {
if m != nil {
return m.Q
}
return nil
}
func (m *Quotum) GetProjectRatio() float32 {
if m != nil {
return m.ProjectRatio
}
return 0
}
func (m *Quotum) GetCpuHoursRatio() float32 {
if x, ok := m.GetQ().(*Quotum_CpuHoursRatio); ok {
return x.CpuHoursRatio
}
return 0
}
func (m *Quotum) GetCpuHoursAbs() float32 {
if x, ok := m.GetQ().(*Quotum_CpuHoursAbs); ok {
return x.CpuHoursAbs
}
return 0
}
func (m *Quotum) GetRamHoursAbs() float32 {
if x, ok := m.GetQ().(*Quotum_RamHoursAbs); ok {
return x.RamHoursAbs
}
return 0
}
func (m *Quotum) GetRamHoursRatio() float32 {
if x, ok := m.GetQ().(*Quotum_RamHoursRatio); ok {
return x.RamHoursRatio
}
return 0
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Quotum) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Quotum_OneofMarshaler, _Quotum_OneofUnmarshaler, _Quotum_OneofSizer, []interface{}{
(*Quotum_CpuHoursRatio)(nil),
(*Quotum_CpuHoursAbs)(nil),
(*Quotum_RamHoursAbs)(nil),
(*Quotum_RamHoursRatio)(nil),
}
}
func _Quotum_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Quotum)
// Q
switch x := m.Q.(type) {
case *Quotum_CpuHoursRatio:
b.EncodeVarint(10<<3 | proto.WireFixed32)
b.EncodeFixed32(uint64(math.Float32bits(x.CpuHoursRatio)))
case *Quotum_CpuHoursAbs:
b.EncodeVarint(11<<3 | proto.WireFixed32)
b.EncodeFixed32(uint64(math.Float32bits(x.CpuHoursAbs)))
case *Quotum_RamHoursAbs:
b.EncodeVarint(12<<3 | proto.WireFixed32)
b.EncodeFixed32(uint64(math.Float32bits(x.RamHoursAbs)))
case *Quotum_RamHoursRatio:
b.EncodeVarint(13<<3 | proto.WireFixed32)
b.EncodeFixed32(uint64(math.Float32bits(x.RamHoursRatio)))
case nil:
default:
return fmt.Errorf("Quotum.Q has unexpected type %T", x)
}
return nil
}
func _Quotum_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Quotum)
switch tag {
case 10: // Q.CpuHoursRatio
if wire != proto.WireFixed32 {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeFixed32()
m.Q = &Quotum_CpuHoursRatio{math.Float32frombits(uint32(x))}
return true, err
case 11: // Q.CpuHoursAbs
if wire != proto.WireFixed32 {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeFixed32()
m.Q = &Quotum_CpuHoursAbs{math.Float32frombits(uint32(x))}
return true, err
case 12: // Q.RamHoursAbs
if wire != proto.WireFixed32 {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeFixed32()
m.Q = &Quotum_RamHoursAbs{math.Float32frombits(uint32(x))}
return true, err
case 13: // Q.RamHoursRatio
if wire != proto.WireFixed32 {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeFixed32()
m.Q = &Quotum_RamHoursRatio{math.Float32frombits(uint32(x))}
return true, err
default:
return false, nil
}
}
func _Quotum_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Quotum)
// Q
switch x := m.Q.(type) {
case *Quotum_CpuHoursRatio:
n += 1 // tag and wire
n += 4
case *Quotum_CpuHoursAbs:
n += 1 // tag and wire
n += 4
case *Quotum_RamHoursAbs:
n += 1 // tag and wire
n += 4
case *Quotum_RamHoursRatio:
n += 1 // tag and wire
n += 4
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
type Organization struct {
Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
Quota *Quotum `protobuf:"bytes,2,opt,name=Quota" json:"Quota,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Organization) Reset() { *m = Organization{} }
func (m *Organization) String() string { return proto.CompactTextString(m) }
func (*Organization) ProtoMessage() {}
func (*Organization) Descriptor() ([]byte, []int) {
return fileDescriptor_schedmessages_885d9f7d21732d74, []int{1}
}
func (m *Organization) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Organization.Unmarshal(m, b)
}
func (m *Organization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Organization.Marshal(b, m, deterministic)
}
func (dst *Organization) XXX_Merge(src proto.Message) {
xxx_messageInfo_Organization.Merge(dst, src)
}
func (m *Organization) XXX_Size() int {
return xxx_messageInfo_Organization.Size(m)
}
func (m *Organization) XXX_DiscardUnknown() {
xxx_messageInfo_Organization.DiscardUnknown(m)
}
var xxx_messageInfo_Organization proto.InternalMessageInfo
func (m *Organization) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Organization) GetQuota() *Quotum {
if m != nil {
return m.Quota
}
return nil
}
type ResourceVolume struct {
Id uint64 `protobuf:"varint,1,opt,name=Id" json:"Id,omitempty"`
CPU uint32 `protobuf:"varint,2,opt,name=CPU" json:"CPU,omitempty"`
GPU uint32 `protobuf:"varint,3,opt,name=GPU" json:"GPU,omitempty"`
RAMmb uint32 `protobuf:"varint,4,opt,name=RAMmb" json:"RAMmb,omitempty"`
TimePeriod uint64 `protobuf:"varint,5,opt,name=TimePeriod" json:"TimePeriod,omitempty"`
Owner *Organization `protobuf:"bytes,6,opt,name=Owner" json:"Owner,omitempty"`
Param uint64 `protobuf:"varint,7,opt,name=Param" json:"Param,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ResourceVolume) Reset() { *m = ResourceVolume{} }
func (m *ResourceVolume) String() string { return proto.CompactTextString(m) }
func (*ResourceVolume) ProtoMessage() {}
func (*ResourceVolume) Descriptor() ([]byte, []int) {
return fileDescriptor_schedmessages_885d9f7d21732d74, []int{2}
}
func (m *ResourceVolume) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ResourceVolume.Unmarshal(m, b)
}
func (m *ResourceVolume) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ResourceVolume.Marshal(b, m, deterministic)
}
func (dst *ResourceVolume) XXX_Merge(src proto.Message) {
xxx_messageInfo_ResourceVolume.Merge(dst, src)
}
func (m *ResourceVolume) XXX_Size() int {
return xxx_messageInfo_ResourceVolume.Size(m)
}
func (m *ResourceVolume) XXX_DiscardUnknown() {
xxx_messageInfo_ResourceVolume.DiscardUnknown(m)
}
var xxx_messageInfo_ResourceVolume proto.InternalMessageInfo
func (m *ResourceVolume) GetId() uint64 {
if m != nil {
return m.Id
}
return 0
}
func (m *ResourceVolume) GetCPU() uint32 {
if m != nil {
return m.CPU
}
return 0
}
func (m *ResourceVolume) GetGPU() uint32 {
if m != nil {
return m.GPU
}
return 0
}
func (m *ResourceVolume) GetRAMmb() uint32 {
if m != nil {
return m.RAMmb
}
return 0
}
func (m *ResourceVolume) GetTimePeriod() uint64 {
if m != nil {
return m.TimePeriod
}
return 0
}
func (m *ResourceVolume) GetOwner() *Organization {
if m != nil {
return m.Owner
}
return nil
}
func (m *ResourceVolume) GetParam() uint64 {
if m != nil {
return m.Param
}
return 0
}
type Decision struct {
// Pairs jobs[idx] -> workers[idx]
JobIdx uint64 `protobuf:"varint,1,opt,name=JobIdx" json:"JobIdx,omitempty"`
WorkerIdx uint64 `protobuf:"varint,2,opt,name=WorkerIdx" json:"WorkerIdx,omitempty"`
CoresNum uint32 `protobuf:"varint,3,opt,name=CoresNum" json:"CoresNum,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Decision) Reset() { *m = Decision{} }
func (m *Decision) String() string { return proto.CompactTextString(m) }
func (*Decision) ProtoMessage() {}
func (*Decision) Descriptor() ([]byte, []int) {
return fileDescriptor_schedmessages_885d9f7d21732d74, []int{3}
}
func (m *Decision) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Decision.Unmarshal(m, b)
}
func (m *Decision) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Decision.Marshal(b, m, deterministic)
}
func (dst *Decision) XXX_Merge(src proto.Message) {
xxx_messageInfo_Decision.Merge(dst, src)
}
func (m *Decision) XXX_Size() int {
return xxx_messageInfo_Decision.Size(m)
}
func (m *Decision) XXX_DiscardUnknown() {
xxx_messageInfo_Decision.DiscardUnknown(m)
}
var xxx_messageInfo_Decision proto.InternalMessageInfo
func (m *Decision) GetJobIdx() uint64 {
if m != nil {
return m.JobIdx
}
return 0
}
func (m *Decision) GetWorkerIdx() uint64 {
if m != nil {
return m.WorkerIdx
}
return 0
}
func (m *Decision) GetCoresNum() uint32 {
if m != nil {
return m.CoresNum
}
return 0
}
func init() {
proto.RegisterType((*Quotum)(nil), "schedulers.Quotum")
proto.RegisterType((*Organization)(nil), "schedulers.Organization")
proto.RegisterType((*ResourceVolume)(nil), "schedulers.ResourceVolume")
proto.RegisterType((*Decision)(nil), "schedulers.Decision")
}
func init() { proto.RegisterFile("schedmessages.proto", fileDescriptor_schedmessages_885d9f7d21732d74) }
var fileDescriptor_schedmessages_885d9f7d21732d74 = []byte{
// 369 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0xcf, 0x6e, 0xe2, 0x30,
0x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