Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: appengine/cmd/dm/distributor/protos/distributor.pb.go

Issue 1537883002: Initial distributor implementation (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: work in progress Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Code generated by protoc-gen-go.
2 // source: distributor.proto
3 // DO NOT EDIT!
4
5 /*
6 Package distributor is a generated protocol buffer package.
7
8 It is generated from these files:
9 distributor.proto
10
11 It has these top-level messages:
12 Alias
13 Distributor
14 Config
15 */
16 package distributor
17
18 import proto "github.com/golang/protobuf/proto"
19 import fmt "fmt"
20 import math "math"
21 import jobsim "github.com/luci/luci-go/appengine/cmd/dm/distributor/protos/jobsi m"
22 import swarmingV1 "github.com/luci/luci-go/appengine/cmd/dm/distributor/protos/s warmingV1"
23
24 // Reference imports to suppress errors if they are not otherwise used.
25 var _ = proto.Marshal
26 var _ = fmt.Errorf
27 var _ = math.Inf
28
29 // This is a compile-time assertion to ensure that this generated file
30 // is compatible with the proto package it is being compiled against.
31 const _ = proto.ProtoPackageIsVersion1
32
33 type Alias struct {
34 OtherConfig string `protobuf:"bytes,1,opt,name=other_config" json:"other _config,omitempty"`
35 }
36
37 func (m *Alias) Reset() { *m = Alias{} }
38 func (m *Alias) String() string { return proto.CompactTextString(m) }
39 func (*Alias) ProtoMessage() {}
40 func (*Alias) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
41
42 type Distributor struct {
43 // TODO(iannucci): Maybe something like Any or extensions would be a bet ter
44 // fit here? The ultimate goal is that users will be able to use the pro to
45 // text format for luci-config. I suspect that Any or extensions would l ose
46 // the ability to validate such text-formatted protobufs, but maybe that 's
47 // not the case.
48 //
49 // Types that are valid to be assigned to DistributorType:
50 // *Distributor_Alias
51 // *Distributor_SwarmingV1
52 // *Distributor_Jobsim
53 DistributorType isDistributor_DistributorType `protobuf_oneof:"distribut or_type"`
54 }
55
56 func (m *Distributor) Reset() { *m = Distributor{} }
57 func (m *Distributor) String() string { return proto.CompactTextStrin g(m) }
58 func (*Distributor) ProtoMessage() {}
59 func (*Distributor) Descriptor() ([]byte, []int) { return fileDescriptor0, []int {1} }
60
61 type isDistributor_DistributorType interface {
62 isDistributor_DistributorType()
63 }
64
65 type Distributor_Alias struct {
66 Alias *Alias `protobuf:"bytes,1,opt,name=alias,oneof"`
67 }
68 type Distributor_SwarmingV1 struct {
69 SwarmingV1 *swarmingV1.Config `protobuf:"bytes,4,opt,name=swarming_v1,on eof"`
70 }
71 type Distributor_Jobsim struct {
72 Jobsim *jobsim.Config `protobuf:"bytes,2048,opt,name=jobsim,oneof"`
73 }
74
75 func (*Distributor_Alias) isDistributor_DistributorType() {}
76 func (*Distributor_SwarmingV1) isDistributor_DistributorType() {}
77 func (*Distributor_Jobsim) isDistributor_DistributorType() {}
78
79 func (m *Distributor) GetDistributorType() isDistributor_DistributorType {
80 if m != nil {
81 return m.DistributorType
82 }
83 return nil
84 }
85
86 func (m *Distributor) GetAlias() *Alias {
87 if x, ok := m.GetDistributorType().(*Distributor_Alias); ok {
88 return x.Alias
89 }
90 return nil
91 }
92
93 func (m *Distributor) GetSwarmingV1() *swarmingV1.Config {
94 if x, ok := m.GetDistributorType().(*Distributor_SwarmingV1); ok {
95 return x.SwarmingV1
96 }
97 return nil
98 }
99
100 func (m *Distributor) GetJobsim() *jobsim.Config {
101 if x, ok := m.GetDistributorType().(*Distributor_Jobsim); ok {
102 return x.Jobsim
103 }
104 return nil
105 }
106
107 // XXX_OneofFuncs is for the internal use of the proto package.
108 func (*Distributor) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) e rror, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), fun c(msg proto.Message) (n int), []interface{}) {
109 return _Distributor_OneofMarshaler, _Distributor_OneofUnmarshaler, _Dist ributor_OneofSizer, []interface{}{
110 (*Distributor_Alias)(nil),
111 (*Distributor_SwarmingV1)(nil),
112 (*Distributor_Jobsim)(nil),
113 }
114 }
115
116 func _Distributor_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
117 m := msg.(*Distributor)
118 // distributor_type
119 switch x := m.DistributorType.(type) {
120 case *Distributor_Alias:
121 b.EncodeVarint(1<<3 | proto.WireBytes)
122 if err := b.EncodeMessage(x.Alias); err != nil {
123 return err
124 }
125 case *Distributor_SwarmingV1:
126 b.EncodeVarint(4<<3 | proto.WireBytes)
127 if err := b.EncodeMessage(x.SwarmingV1); err != nil {
128 return err
129 }
130 case *Distributor_Jobsim:
131 b.EncodeVarint(2048<<3 | proto.WireBytes)
132 if err := b.EncodeMessage(x.Jobsim); err != nil {
133 return err
134 }
135 case nil:
136 default:
137 return fmt.Errorf("Distributor.DistributorType has unexpected ty pe %T", x)
138 }
139 return nil
140 }
141
142 func _Distributor_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Bu ffer) (bool, error) {
143 m := msg.(*Distributor)
144 switch tag {
145 case 1: // distributor_type.alias
146 if wire != proto.WireBytes {
147 return true, proto.ErrInternalBadWireType
148 }
149 msg := new(Alias)
150 err := b.DecodeMessage(msg)
151 m.DistributorType = &Distributor_Alias{msg}
152 return true, err
153 case 4: // distributor_type.swarming_v1
154 if wire != proto.WireBytes {
155 return true, proto.ErrInternalBadWireType
156 }
157 msg := new(swarmingV1.Config)
158 err := b.DecodeMessage(msg)
159 m.DistributorType = &Distributor_SwarmingV1{msg}
160 return true, err
161 case 2048: // distributor_type.jobsim
162 if wire != proto.WireBytes {
163 return true, proto.ErrInternalBadWireType
164 }
165 msg := new(jobsim.Config)
166 err := b.DecodeMessage(msg)
167 m.DistributorType = &Distributor_Jobsim{msg}
168 return true, err
169 default:
170 return false, nil
171 }
172 }
173
174 func _Distributor_OneofSizer(msg proto.Message) (n int) {
175 m := msg.(*Distributor)
176 // distributor_type
177 switch x := m.DistributorType.(type) {
178 case *Distributor_Alias:
179 s := proto.Size(x.Alias)
180 n += proto.SizeVarint(1<<3 | proto.WireBytes)
181 n += proto.SizeVarint(uint64(s))
182 n += s
183 case *Distributor_SwarmingV1:
184 s := proto.Size(x.SwarmingV1)
185 n += proto.SizeVarint(4<<3 | proto.WireBytes)
186 n += proto.SizeVarint(uint64(s))
187 n += s
188 case *Distributor_Jobsim:
189 s := proto.Size(x.Jobsim)
190 n += proto.SizeVarint(2048<<3 | proto.WireBytes)
191 n += proto.SizeVarint(uint64(s))
192 n += s
193 case nil:
194 default:
195 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
196 }
197 return n
198 }
199
200 type Config struct {
201 DistributorConfigs map[string]*Distributor `protobuf:"bytes,1,rep,name=d istributor_configs" json:"distributor_configs,omitempty" protobuf_key:"bytes,1,o pt,name=key" protobuf_val:"bytes,2,opt,name=value"`
202 }
203
204 func (m *Config) Reset() { *m = Config{} }
205 func (m *Config) String() string { return proto.CompactTextString(m) }
206 func (*Config) ProtoMessage() {}
207 func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
208
209 func (m *Config) GetDistributorConfigs() map[string]*Distributor {
210 if m != nil {
211 return m.DistributorConfigs
212 }
213 return nil
214 }
215
216 func init() {
217 proto.RegisterType((*Alias)(nil), "distributor.Alias")
218 proto.RegisterType((*Distributor)(nil), "distributor.Distributor")
219 proto.RegisterType((*Config)(nil), "distributor.Config")
220 }
221
222 var fileDescriptor0 = []byte{
223 // 275 bytes of a gzipped FileDescriptorProto
224 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x4c, 0xc9, 0x2c, 0x2e,
225 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0xc9, 0x2f, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x46,
226 0x12, 0x92, 0x12, 0xce, 0xca, 0x4f, 0x2a, 0xce, 0xcc, 0xd5, 0x87, 0x50, 0x10, 0x15, 0x52, 0xd2,
227 0xc5, 0xe5, 0x89, 0x45, 0xb9, 0x99, 0x79, 0xe9, 0x61, 0x86, 0xfa, 0x08, 0x26, 0x44, 0x52, 0x49,
228 0x96, 0x8b, 0xd5, 0x31, 0x27, 0x33, 0xb1, 0x58, 0x48, 0x84, 0x8b, 0x27, 0xbf, 0x24, 0x23, 0xb5,
229 0x28, 0x3e, 0x39, 0x3f, 0x2f, 0x2d, 0x33, 0x5d, 0x82, 0x51, 0x81, 0x51, 0x83, 0x53, 0x69, 0x01,
230 0x23, 0x17, 0xb7, 0x0b, 0xc2, 0x02, 0x21, 0x65, 0x2e, 0xd6, 0x44, 0x90, 0x72, 0xb0, 0x34, 0xb7,
231 0x91, 0x90, 0x1e, 0xb2, 0x83, 0xc0, 0x06, 0x79, 0x30, 0x08, 0x69, 0x72, 0x71, 0xc3, 0xec, 0x89,
232 0x2f, 0x33, 0x94, 0x60, 0x81, 0x2a, 0x45, 0xb2, 0xdb, 0x19, 0x6c, 0x07, 0x50, 0xa9, 0x22, 0x17,
233 0x1b, 0xc4, 0xad, 0x12, 0x0d, 0x02, 0x60, 0x65, 0x7c, 0x7a, 0x50, 0xb7, 0xc3, 0x94, 0x38, 0x09,
234 0x71, 0x09, 0x20, 0x59, 0x12, 0x5f, 0x52, 0x59, 0x90, 0xea, 0xc5, 0xc2, 0xc1, 0x24, 0xc0, 0x0c,
235 0x24, 0x99, 0x05, 0x58, 0x94, 0x96, 0x33, 0x72, 0xb1, 0x41, 0x14, 0x0b, 0x79, 0x70, 0x09, 0x23,
236 0x2b, 0x85, 0xf8, 0x04, 0xe4, 0x56, 0x66, 0xa0, 0xc9, 0xda, 0x28, 0x6e, 0x85, 0xe8, 0xd0, 0x43,
237 0xf2, 0x1b, 0x44, 0xa4, 0xd8, 0x35, 0xaf, 0xa4, 0xa8, 0x52, 0x2a, 0x98, 0x4b, 0x1c, 0x87, 0x94,
238 0x10, 0x37, 0x17, 0x73, 0x76, 0x6a, 0x25, 0x24, 0x7c, 0x84, 0xd4, 0xb9, 0x58, 0xcb, 0x12, 0x73,
239 0x4a, 0x53, 0x25, 0x98, 0xc0, 0xae, 0x97, 0x40, 0xb1, 0x03, 0xc9, 0x04, 0x2b, 0x26, 0x0b, 0xc6,
240 0x24, 0x36, 0x70, 0x90, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xcf, 0xb8, 0x28, 0x84, 0xc6,
241 0x01, 0x00, 0x00,
242 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698