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

Side by Side Diff: milo/api/proto/buildinfo.pb.go

Issue 2667353002: milo: Add barebones BuildInfo pRPC service. (Closed)
Patch Set: Swap order, users first. Created 3 years, 10 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
« no previous file with comments | « milo/api/proto/buildinfo.proto ('k') | milo/api/proto/buildinfoserver_dec.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Code generated by protoc-gen-go.
2 // source: github.com/luci/luci-go/milo/api/proto/buildinfo.proto
3 // DO NOT EDIT!
4
5 package milo
6
7 import prpc "github.com/luci/luci-go/grpc/prpc"
8
9 import proto "github.com/golang/protobuf/proto"
10 import fmt "fmt"
11 import math "math"
12 import milo1 "github.com/luci/luci-go/common/proto/milo"
13
14 import (
15 context "golang.org/x/net/context"
16 grpc "google.golang.org/grpc"
17 )
18
19 // Reference imports to suppress errors if they are not otherwise used.
20 var _ = proto.Marshal
21 var _ = fmt.Errorf
22 var _ = math.Inf
23
24 type BuildInfoRequest struct {
25 // Types that are valid to be assigned to Build:
26 // *BuildInfoRequest_Buildbot
27 // *BuildInfoRequest_Swarming_
28 Build isBuildInfoRequest_Build `protobuf_oneof:"build"`
29 // Project hint is a LUCI project suggestion for this build. Some builds ,
30 // notably older ones, may not contain enough metadata to resolve their
31 // project. Resolution may succeed if this hint is provided and correct.
32 //
33 // This field is optional, and its use is discouraged unless necessary.
34 ProjectHint string `protobuf:"bytes,11,opt,name=project_hint,json=projec tHint" json:"project_hint,omitempty"`
35 }
36
37 func (m *BuildInfoRequest) Reset() { *m = BuildInfoRequest{} }
38 func (m *BuildInfoRequest) String() string { return proto.CompactText String(m) }
39 func (*BuildInfoRequest) ProtoMessage() {}
40 func (*BuildInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
41
42 type isBuildInfoRequest_Build interface {
43 isBuildInfoRequest_Build()
44 }
45
46 type BuildInfoRequest_Buildbot struct {
47 Buildbot *BuildInfoRequest_BuildBot `protobuf:"bytes,1,opt,name=buildbot ,oneof"`
48 }
49 type BuildInfoRequest_Swarming_ struct {
50 Swarming *BuildInfoRequest_Swarming `protobuf:"bytes,2,opt,name=swarming ,oneof"`
51 }
52
53 func (*BuildInfoRequest_Buildbot) isBuildInfoRequest_Build() {}
54 func (*BuildInfoRequest_Swarming_) isBuildInfoRequest_Build() {}
55
56 func (m *BuildInfoRequest) GetBuild() isBuildInfoRequest_Build {
57 if m != nil {
58 return m.Build
59 }
60 return nil
61 }
62
63 func (m *BuildInfoRequest) GetBuildbot() *BuildInfoRequest_BuildBot {
64 if x, ok := m.GetBuild().(*BuildInfoRequest_Buildbot); ok {
65 return x.Buildbot
66 }
67 return nil
68 }
69
70 func (m *BuildInfoRequest) GetSwarming() *BuildInfoRequest_Swarming {
71 if x, ok := m.GetBuild().(*BuildInfoRequest_Swarming_); ok {
72 return x.Swarming
73 }
74 return nil
75 }
76
77 func (m *BuildInfoRequest) GetProjectHint() string {
78 if m != nil {
79 return m.ProjectHint
80 }
81 return ""
82 }
83
84 // XXX_OneofFuncs is for the internal use of the proto package.
85 func (*BuildInfoRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buff er) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) , func(msg proto.Message) (n int), []interface{}) {
86 return _BuildInfoRequest_OneofMarshaler, _BuildInfoRequest_OneofUnmarsha ler, _BuildInfoRequest_OneofSizer, []interface{}{
87 (*BuildInfoRequest_Buildbot)(nil),
88 (*BuildInfoRequest_Swarming_)(nil),
89 }
90 }
91
92 func _BuildInfoRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
93 m := msg.(*BuildInfoRequest)
94 // build
95 switch x := m.Build.(type) {
96 case *BuildInfoRequest_Buildbot:
97 b.EncodeVarint(1<<3 | proto.WireBytes)
98 if err := b.EncodeMessage(x.Buildbot); err != nil {
99 return err
100 }
101 case *BuildInfoRequest_Swarming_:
102 b.EncodeVarint(2<<3 | proto.WireBytes)
103 if err := b.EncodeMessage(x.Swarming); err != nil {
104 return err
105 }
106 case nil:
107 default:
108 return fmt.Errorf("BuildInfoRequest.Build has unexpected type %T ", x)
109 }
110 return nil
111 }
112
113 func _BuildInfoRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *pro to.Buffer) (bool, error) {
114 m := msg.(*BuildInfoRequest)
115 switch tag {
116 case 1: // build.buildbot
117 if wire != proto.WireBytes {
118 return true, proto.ErrInternalBadWireType
119 }
120 msg := new(BuildInfoRequest_BuildBot)
121 err := b.DecodeMessage(msg)
122 m.Build = &BuildInfoRequest_Buildbot{msg}
123 return true, err
124 case 2: // build.swarming
125 if wire != proto.WireBytes {
126 return true, proto.ErrInternalBadWireType
127 }
128 msg := new(BuildInfoRequest_Swarming)
129 err := b.DecodeMessage(msg)
130 m.Build = &BuildInfoRequest_Swarming_{msg}
131 return true, err
132 default:
133 return false, nil
134 }
135 }
136
137 func _BuildInfoRequest_OneofSizer(msg proto.Message) (n int) {
138 m := msg.(*BuildInfoRequest)
139 // build
140 switch x := m.Build.(type) {
141 case *BuildInfoRequest_Buildbot:
142 s := proto.Size(x.Buildbot)
143 n += proto.SizeVarint(1<<3 | proto.WireBytes)
144 n += proto.SizeVarint(uint64(s))
145 n += s
146 case *BuildInfoRequest_Swarming_:
147 s := proto.Size(x.Swarming)
148 n += proto.SizeVarint(2<<3 | proto.WireBytes)
149 n += proto.SizeVarint(uint64(s))
150 n += s
151 case nil:
152 default:
153 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
154 }
155 return n
156 }
157
158 // The request for the name of a BuildBot built.
159 type BuildInfoRequest_BuildBot struct {
160 // The master name.
161 MasterName string `protobuf:"bytes,1,opt,name=master_name,json=masterNam e" json:"master_name,omitempty"`
162 // The builder name server.
163 BuilderName string `protobuf:"bytes,2,opt,name=builder_name,json=builder Name" json:"builder_name,omitempty"`
164 // The build number.
165 BuildNumber int64 `protobuf:"varint,3,opt,name=build_number,json=buildNu mber" json:"build_number,omitempty"`
166 }
167
168 func (m *BuildInfoRequest_BuildBot) Reset() { *m = BuildInfoR equest_BuildBot{} }
169 func (m *BuildInfoRequest_BuildBot) String() string { return proto.Co mpactTextString(m) }
170 func (*BuildInfoRequest_BuildBot) ProtoMessage() {}
171 func (*BuildInfoRequest_BuildBot) Descriptor() ([]byte, []int) { return fileDesc riptor1, []int{0, 0} }
172
173 func (m *BuildInfoRequest_BuildBot) GetMasterName() string {
174 if m != nil {
175 return m.MasterName
176 }
177 return ""
178 }
179
180 func (m *BuildInfoRequest_BuildBot) GetBuilderName() string {
181 if m != nil {
182 return m.BuilderName
183 }
184 return ""
185 }
186
187 func (m *BuildInfoRequest_BuildBot) GetBuildNumber() int64 {
188 if m != nil {
189 return m.BuildNumber
190 }
191 return 0
192 }
193
194 // The request containing a Swarming task.
195 type BuildInfoRequest_Swarming struct {
196 // Host is the hostname of the Swarming server to connect to
197 // (e.g., "swarming.example.com").
198 //
199 // This is optional. If omitted or empty, Milo's default Swarming server
200 // will be used.
201 Host string `protobuf:"bytes,1,opt,name=host" json:"host,omitempty"`
202 // The Swarming task name.
203 Task string `protobuf:"bytes,2,opt,name=task" json:"task,omitempty"`
204 }
205
206 func (m *BuildInfoRequest_Swarming) Reset() { *m = BuildInfoR equest_Swarming{} }
207 func (m *BuildInfoRequest_Swarming) String() string { return proto.Co mpactTextString(m) }
208 func (*BuildInfoRequest_Swarming) ProtoMessage() {}
209 func (*BuildInfoRequest_Swarming) Descriptor() ([]byte, []int) { return fileDesc riptor1, []int{0, 1} }
210
211 func (m *BuildInfoRequest_Swarming) GetHost() string {
212 if m != nil {
213 return m.Host
214 }
215 return ""
216 }
217
218 func (m *BuildInfoRequest_Swarming) GetTask() string {
219 if m != nil {
220 return m.Task
221 }
222 return ""
223 }
224
225 // The request containing the name of the master.
226 type BuildInfoResponse struct {
227 // The LUCI project that this build belongs to.
228 Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitem pty"`
229 // The main build step.
230 Step *milo1.Step `protobuf:"bytes,2,opt,name=step" json:"step,omitempty" `
231 // The LogDog annotation stream for this build. The Prefix will be popul ated
232 // and can be used as the prefix for any un-prefixed LogdogStream in "st ep".
233 AnnotationStream *milo1.LogdogStream `protobuf:"bytes,3,opt,name=annotat ion_stream,json=annotationStream" json:"annotation_stream,omitempty"`
234 }
235
236 func (m *BuildInfoResponse) Reset() { *m = BuildInfoResponse{ } }
237 func (m *BuildInfoResponse) String() string { return proto.CompactTex tString(m) }
238 func (*BuildInfoResponse) ProtoMessage() {}
239 func (*BuildInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
240
241 func (m *BuildInfoResponse) GetProject() string {
242 if m != nil {
243 return m.Project
244 }
245 return ""
246 }
247
248 func (m *BuildInfoResponse) GetStep() *milo1.Step {
249 if m != nil {
250 return m.Step
251 }
252 return nil
253 }
254
255 func (m *BuildInfoResponse) GetAnnotationStream() *milo1.LogdogStream {
256 if m != nil {
257 return m.AnnotationStream
258 }
259 return nil
260 }
261
262 func init() {
263 proto.RegisterType((*BuildInfoRequest)(nil), "milo.BuildInfoRequest")
264 proto.RegisterType((*BuildInfoRequest_BuildBot)(nil), "milo.BuildInfoReq uest.BuildBot")
265 proto.RegisterType((*BuildInfoRequest_Swarming)(nil), "milo.BuildInfoReq uest.Swarming")
266 proto.RegisterType((*BuildInfoResponse)(nil), "milo.BuildInfoResponse")
267 }
268
269 // Reference imports to suppress errors if they are not otherwise used.
270 var _ context.Context
271 var _ grpc.ClientConn
272
273 // This is a compile-time assertion to ensure that this generated file
274 // is compatible with the grpc package it is being compiled against.
275 const _ = grpc.SupportPackageIsVersion4
276
277 // Client API for BuildInfo service
278
279 type BuildInfoClient interface {
280 Get(ctx context.Context, in *BuildInfoRequest, opts ...grpc.CallOption) (*BuildInfoResponse, error)
281 }
282 type buildInfoPRPCClient struct {
283 client *prpc.Client
284 }
285
286 func NewBuildInfoPRPCClient(client *prpc.Client) BuildInfoClient {
287 return &buildInfoPRPCClient{client}
288 }
289
290 func (c *buildInfoPRPCClient) Get(ctx context.Context, in *BuildInfoRequest, opt s ...grpc.CallOption) (*BuildInfoResponse, error) {
291 out := new(BuildInfoResponse)
292 err := c.client.Call(ctx, "milo.BuildInfo", "Get", in, out, opts...)
293 if err != nil {
294 return nil, err
295 }
296 return out, nil
297 }
298
299 type buildInfoClient struct {
300 cc *grpc.ClientConn
301 }
302
303 func NewBuildInfoClient(cc *grpc.ClientConn) BuildInfoClient {
304 return &buildInfoClient{cc}
305 }
306
307 func (c *buildInfoClient) Get(ctx context.Context, in *BuildInfoRequest, opts .. .grpc.CallOption) (*BuildInfoResponse, error) {
308 out := new(BuildInfoResponse)
309 err := grpc.Invoke(ctx, "/milo.BuildInfo/Get", in, out, c.cc, opts...)
310 if err != nil {
311 return nil, err
312 }
313 return out, nil
314 }
315
316 // Server API for BuildInfo service
317
318 type BuildInfoServer interface {
319 Get(context.Context, *BuildInfoRequest) (*BuildInfoResponse, error)
320 }
321
322 func RegisterBuildInfoServer(s prpc.Registrar, srv BuildInfoServer) {
323 s.RegisterService(&_BuildInfo_serviceDesc, srv)
324 }
325
326 func _BuildInfo_Get_Handler(srv interface{}, ctx context.Context, dec func(inter face{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
327 in := new(BuildInfoRequest)
328 if err := dec(in); err != nil {
329 return nil, err
330 }
331 if interceptor == nil {
332 return srv.(BuildInfoServer).Get(ctx, in)
333 }
334 info := &grpc.UnaryServerInfo{
335 Server: srv,
336 FullMethod: "/milo.BuildInfo/Get",
337 }
338 handler := func(ctx context.Context, req interface{}) (interface{}, erro r) {
339 return srv.(BuildInfoServer).Get(ctx, req.(*BuildInfoRequest))
340 }
341 return interceptor(ctx, in, info, handler)
342 }
343
344 var _BuildInfo_serviceDesc = grpc.ServiceDesc{
345 ServiceName: "milo.BuildInfo",
346 HandlerType: (*BuildInfoServer)(nil),
347 Methods: []grpc.MethodDesc{
348 {
349 MethodName: "Get",
350 Handler: _BuildInfo_Get_Handler,
351 },
352 },
353 Streams: []grpc.StreamDesc{},
354 Metadata: "github.com/luci/luci-go/milo/api/proto/buildinfo.proto",
355 }
356
357 func init() {
358 proto.RegisterFile("github.com/luci/luci-go/milo/api/proto/buildinfo.pro to", fileDescriptor1)
359 }
360
361 var fileDescriptor1 = []byte{
362 // 383 bytes of a gzipped FileDescriptorProto
363 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x92, 0xbf, 0xae, 0xd3, 0x30,
364 0x18, 0xc5, 0x49, 0x5b, 0xb8, 0xed, 0x17, 0x86, 0x7b, 0x3d, 0x40, 0x94, 0x81, 0x96, 0x4e, 0x5d,
365 0x48, 0xa4, 0x20, 0x75, 0x41, 0x08, 0xa9, 0x0c, 0x14, 0x09, 0x75, 0x48, 0x1f, 0x20, 0x72, 0x52,
366 0x37, 0x35, 0xd4, 0xfe, 0xd2, 0xf8, 0x8b, 0x78, 0x0b, 0x5e, 0x92, 0x17, 0x41, 0xb1, 0x9d, 0x96,
367 0xff, 0x4b, 0x64, 0xff, 0x7c, 0xce, 0xf1, 0xb1, 0x1d, 0x58, 0xd7, 0x92, 0x4e, 0x5d, 0x99, 0x54,
368 0xa8, 0xd2, 0x73, 0x57, 0x49, 0xfb, 0x79, 0x55, 0x63, 0xaa, 0xe4, 0x19, 0x53, 0xde, 0xc8, 0xb4,
369 0x69, 0x91, 0x30, 0x2d, 0x3b, 0x79, 0x3e, 0x48, 0x7d, 0xc4, 0xc4, 0xce, 0xd9, 0xa4, 0x5f, 0x8f,
370 0xdf, 0xfc, 0xcb, 0x5d, 0xa1, 0x52, 0xa8, 0xbd, 0xd7, 0x45, 0x69, 0x8d, 0xc4, 0x49, 0xa2, 0x36,
371 0x2e, 0x62, 0xf9, 0x7d, 0x04, 0xf7, 0x9b, 0x3e, 0xf6, 0xa3, 0x3e, 0x62, 0x2e, 0x2e, 0x9d, 0x30,
372 0xc4, 0xde, 0xc2, 0xd4, 0x6e, 0x55, 0x22, 0x45, 0xc1, 0x22, 0x58, 0x85, 0xd9, 0x3c, 0xe9, 0xfd,
373 0xc9, 0xef, 0x4a, 0x07, 0x36, 0x48, 0xdb, 0x47, 0xf9, 0xd5, 0xd2, 0xdb, 0xcd, 0x57, 0xde, 0x2a,
374 0xa9, 0xeb, 0x68, 0xf4, 0x5f, 0xfb, 0xde, 0xcb, 0x7a, 0xfb, 0x60, 0x61, 0x2f, 0xe1, 0x69, 0xd3,
375 0xe2, 0x67, 0x51, 0x51, 0x71, 0x92, 0x9a, 0xa2, 0x70, 0x11, 0xac, 0x66, 0x79, 0xe8, 0xd9, 0x56,
376 0x6a, 0x8a, 0x2f, 0x30, 0x1d, 0x76, 0x66, 0x73, 0x08, 0x15, 0x37, 0x24, 0xda, 0x42, 0x73, 0x25,
377 0x6c, 0xdf, 0x59, 0x0e, 0x0e, 0xed, 0xb8, 0x12, 0x7d, 0x9e, 0xad, 0x36, 0x28, 0x46, 0x2e, 0xcf,
378 0xb3, 0x5f, 0x24, 0x85, 0xee, 0x54, 0x29, 0xda, 0x68, 0xbc, 0x08, 0x56, 0x63, 0x2f, 0xd9, 0x59,
379 0x14, 0x67, 0x30, 0x1d, 0xda, 0x32, 0x06, 0x93, 0x13, 0x1a, 0xf2, 0x7b, 0xd9, 0x71, 0xcf, 0x88,
380 0x9b, 0x2f, 0x3e, 0xdd, 0x8e, 0x37, 0x77, 0xf0, 0xd8, 0x46, 0x2c, 0xbf, 0x05, 0xf0, 0xf0, 0xd3,
381 0xe1, 0x4d, 0x83, 0xda, 0x08, 0x16, 0xc1, 0x9d, 0x3f, 0x94, 0x4f, 0x1a, 0xa6, 0xec, 0x05, 0x4c,
382 0x0c, 0x89, 0xc6, 0xdf, 0x1e, 0xb8, 0xdb, 0xdb, 0x93, 0x68, 0x72, 0xcb, 0xd9, 0x3b, 0x78, 0xb8,
383 0x3d, 0x65, 0x61, 0xa8, 0x15, 0x5c, 0xd9, 0xd2, 0x61, 0xc6, 0x9c, 0xf8, 0x13, 0xd6, 0x07, 0xac,
384 0xf7, 0x76, 0x25, 0xbf, 0xbf, 0x89, 0x1d, 0xc9, 0xde, 0xc3, 0xec, 0xda, 0x87, 0xad, 0x61, 0xfc,
385 0x41, 0x10, 0x7b, 0xf6, 0xf7, 0x47, 0x8a, 0x9f, 0xff, 0xc1, 0x5d, 0xff, 0xf2, 0x89, 0xfd, 0x85,
386 0x5e, 0xff, 0x08, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x29, 0xcb, 0x8a, 0xbf, 0x02, 0x00, 0x00,
387 }
OLDNEW
« no previous file with comments | « milo/api/proto/buildinfo.proto ('k') | milo/api/proto/buildinfoserver_dec.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698