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

Side by Side Diff: traceservice/proto/traceservice.pb.go

Issue 1411663004: Create gRPC client and server, traceservice, that stores trace data in a BoltDB backend. (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: clean Created 5 years, 2 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: traceservice.proto
3 // DO NOT EDIT!
4
5 /*
6 Package traceservice is a generated protocol buffer package.
7
8 It is generated from these files:
9 traceservice.proto
10
11 It has these top-level messages:
12 EmptyResponse
13 CommitID
14 Params
15 MissingParamsRequest
16 MissingParamsResponse
17 AddParamsRequest
18 StoredEntry
19 AddRequest
20 RemoveRequest
21 ListRequest
22 ListResponse
23 GetValuesRequest
24 GetValuesResponse
25 GetParamsRequest
26 GetParamsResponse
27 */
28 package traceservice
29
30 import proto "github.com/golang/protobuf/proto"
31 import fmt "fmt"
32 import math "math"
33
34 import (
35 context "golang.org/x/net/context"
36 grpc "google.golang.org/grpc"
37 )
38
39 // Reference imports to suppress errors if they are not otherwise used.
40 var _ = proto.Marshal
41 var _ = fmt.Errorf
42 var _ = math.Inf
43
44 type EmptyResponse struct {
45 }
46
47 func (m *EmptyResponse) Reset() { *m = EmptyResponse{} }
48 func (m *EmptyResponse) String() string { return proto.CompactTextString(m) }
49 func (*EmptyResponse) ProtoMessage() {}
50
51 // CommitID identifies one commit, or trybot try.
52 type CommitID struct {
53 // The id of a commit, either a git hash, or a Reitveld patch id.
54 Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
55 // The source of the commit, either a git branch name, or a Reitveld iss ue id.
56 Source string `protobuf:"bytes,2,opt,name=source" json:"source,omitempty "`
57 // The timestamp of the commit or trybot patch.
58 Timestamp int64 `protobuf:"varint,3,opt,name=timestamp" json:"timestamp, omitempty"`
59 }
60
61 func (m *CommitID) Reset() { *m = CommitID{} }
62 func (m *CommitID) String() string { return proto.CompactTextString(m) }
63 func (*CommitID) ProtoMessage() {}
64
65 // Params are the key-value pairs for a single trace.
66 //
67 // All of the key-value parameters should be present, the ones used to
68 // construct the traceid, along with optional parameters.
69 type Params struct {
70 Params map[string]string `protobuf:"bytes,1,rep,name=params" json:"param s,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name= value"`
71 }
72
73 func (m *Params) Reset() { *m = Params{} }
74 func (m *Params) String() string { return proto.CompactTextString(m) }
75 func (*Params) ProtoMessage() {}
76
77 func (m *Params) GetParams() map[string]string {
78 if m != nil {
79 return m.Params
80 }
81 return nil
82 }
83
84 type MissingParamsRequest struct {
85 Traceids []string `protobuf:"bytes,1,rep,name=traceids" json:"traceids,o mitempty"`
86 }
87
88 func (m *MissingParamsRequest) Reset() { *m = MissingParamsRequest{} }
89 func (m *MissingParamsRequest) String() string { return proto.CompactTextString( m) }
90 func (*MissingParamsRequest) ProtoMessage() {}
91
92 type MissingParamsResponse struct {
93 Traceids []string `protobuf:"bytes,1,rep,name=traceids" json:"traceids,o mitempty"`
94 }
95
96 func (m *MissingParamsResponse) Reset() { *m = MissingParamsResponse{} }
97 func (m *MissingParamsResponse) String() string { return proto.CompactTextString (m) }
98 func (*MissingParamsResponse) ProtoMessage() {}
99
100 type AddParamsRequest struct {
101 // maps traceid to the Params for that trace.
102 Params map[string]*Params `protobuf:"bytes,1,rep,name=params" json:"para ms,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name =value"`
103 }
104
105 func (m *AddParamsRequest) Reset() { *m = AddParamsRequest{} }
106 func (m *AddParamsRequest) String() string { return proto.CompactTextString(m) }
107 func (*AddParamsRequest) ProtoMessage() {}
108
109 func (m *AddParamsRequest) GetParams() map[string]*Params {
110 if m != nil {
111 return m.Params
112 }
113 return nil
114 }
115
116 // StoredEntry is used to serialize the Params to be stored in the BoltBD.
117 type StoredEntry struct {
118 // id is the trace id.
119 Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
120 // The parameters for the trace.
121 Params *Params `protobuf:"bytes,2,opt,name=params" json:"params,omitempt y"`
122 }
123
124 func (m *StoredEntry) Reset() { *m = StoredEntry{} }
125 func (m *StoredEntry) String() string { return proto.CompactTextString(m) }
126 func (*StoredEntry) ProtoMessage() {}
127
128 func (m *StoredEntry) GetParams() *Params {
129 if m != nil {
130 return m.Params
131 }
132 return nil
133 }
134
135 type AddRequest struct {
136 // The id of the commit/trybot we are adding data about.
137 Commitid *CommitID `protobuf:"bytes,1,opt,name=commitid" json:"commitid, omitempty"`
138 // A map of traceid to Entry.
139 Entries map[string][]byte `protobuf:"bytes,2,rep,name=entries" json:"ent ries,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,na me=value,proto3"`
140 }
141
142 func (m *AddRequest) Reset() { *m = AddRequest{} }
143 func (m *AddRequest) String() string { return proto.CompactTextString(m) }
144 func (*AddRequest) ProtoMessage() {}
145
146 func (m *AddRequest) GetCommitid() *CommitID {
147 if m != nil {
148 return m.Commitid
149 }
150 return nil
151 }
152
153 func (m *AddRequest) GetEntries() map[string][]byte {
154 if m != nil {
155 return m.Entries
156 }
157 return nil
158 }
159
160 type RemoveRequest struct {
161 // The id of the commit/trybot we are removing.
162 Commitid *CommitID `protobuf:"bytes,1,opt,name=commitid" json:"commitid, omitempty"`
163 }
164
165 func (m *RemoveRequest) Reset() { *m = RemoveRequest{} }
166 func (m *RemoveRequest) String() string { return proto.CompactTextString(m) }
167 func (*RemoveRequest) ProtoMessage() {}
168
169 func (m *RemoveRequest) GetCommitid() *CommitID {
170 if m != nil {
171 return m.Commitid
172 }
173 return nil
174 }
175
176 type ListRequest struct {
177 // begin is the unix timestamp to start searching from.
178 Begin int64 `protobuf:"varint,1,opt,name=begin" json:"begin,omitempty"`
179 // end is the unix timestamp to search to (inclusive).
180 End int64 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
181 }
182
183 func (m *ListRequest) Reset() { *m = ListRequest{} }
184 func (m *ListRequest) String() string { return proto.CompactTextString(m) }
185 func (*ListRequest) ProtoMessage() {}
186
187 type ListResponse struct {
188 // A list of CommitIDs that fall between the given timestamps in
189 // ListRequest.
190 Commitids []*CommitID `protobuf:"bytes,3,rep,name=commitids" json:"commi tids,omitempty"`
191 }
192
193 func (m *ListResponse) Reset() { *m = ListResponse{} }
194 func (m *ListResponse) String() string { return proto.CompactTextString(m) }
195 func (*ListResponse) ProtoMessage() {}
196
197 func (m *ListResponse) GetCommitids() []*CommitID {
198 if m != nil {
199 return m.Commitids
200 }
201 return nil
202 }
203
204 type GetValuesRequest struct {
205 Commitid *CommitID `protobuf:"bytes,1,opt,name=commitid" json:"commitid, omitempty"`
206 }
207
208 func (m *GetValuesRequest) Reset() { *m = GetValuesRequest{} }
209 func (m *GetValuesRequest) String() string { return proto.CompactTextString(m) }
210 func (*GetValuesRequest) ProtoMessage() {}
211
212 func (m *GetValuesRequest) GetCommitid() *CommitID {
213 if m != nil {
214 return m.Commitid
215 }
216 return nil
217 }
218
219 type GetValuesResponse struct {
220 // Maps traceid's to their []byte serialized values.
221 Values map[string][]byte `protobuf:"bytes,3,rep,name=values" json:"value s,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name= value,proto3"`
222 }
223
224 func (m *GetValuesResponse) Reset() { *m = GetValuesResponse{} }
225 func (m *GetValuesResponse) String() string { return proto.CompactTextString(m) }
226 func (*GetValuesResponse) ProtoMessage() {}
227
228 func (m *GetValuesResponse) GetValues() map[string][]byte {
229 if m != nil {
230 return m.Values
231 }
232 return nil
233 }
234
235 type GetParamsRequest struct {
236 // A list of traceids.
237 Traceids []string `protobuf:"bytes,1,rep,name=traceids" json:"traceids,o mitempty"`
238 }
239
240 func (m *GetParamsRequest) Reset() { *m = GetParamsRequest{} }
241 func (m *GetParamsRequest) String() string { return proto.CompactTextString(m) }
242 func (*GetParamsRequest) ProtoMessage() {}
243
244 type GetParamsResponse struct {
245 // Maps traceids to their Params.
246 Params map[string]*Params `protobuf:"bytes,3,rep,name=params" json:"para ms,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name =value"`
247 }
248
249 func (m *GetParamsResponse) Reset() { *m = GetParamsResponse{} }
250 func (m *GetParamsResponse) String() string { return proto.CompactTextString(m) }
251 func (*GetParamsResponse) ProtoMessage() {}
252
253 func (m *GetParamsResponse) GetParams() map[string]*Params {
254 if m != nil {
255 return m.Params
256 }
257 return nil
258 }
259
260 // Reference imports to suppress errors if they are not otherwise used.
261 var _ context.Context
262 var _ grpc.ClientConn
263
264 // Client API for TraceService service
265
266 type TraceServiceClient interface {
267 // Returns a list of traceids that don't have Params stored in the datas tore.
268 MissingParams(ctx context.Context, in *MissingParamsRequest, opts ...grp c.CallOption) (*MissingParamsResponse, error)
269 // Adds Params for a set of traceids.
270 AddParams(ctx context.Context, in *AddParamsRequest, opts ...grpc.CallOp tion) (*EmptyResponse, error)
271 // Adds data for a set of traces for a particular commitid.
272 Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*Empt yResponse, error)
273 // Removes data for a particular commitid.
274 Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
275 // List returns all the CommitIDs that exist in the given time range.
276 List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*Li stResponse, error)
277 // GetValues returns all the trace values stored for the given CommitID.
278 GetValues(ctx context.Context, in *GetValuesRequest, opts ...grpc.CallOp tion) (*GetValuesResponse, error)
279 // GetParams returns the Params for all of the given traces.
280 GetParams(ctx context.Context, in *GetParamsRequest, opts ...grpc.CallOp tion) (*GetParamsResponse, error)
281 }
282
283 type traceServiceClient struct {
284 cc *grpc.ClientConn
285 }
286
287 func NewTraceServiceClient(cc *grpc.ClientConn) TraceServiceClient {
288 return &traceServiceClient{cc}
289 }
290
291 func (c *traceServiceClient) MissingParams(ctx context.Context, in *MissingParam sRequest, opts ...grpc.CallOption) (*MissingParamsResponse, error) {
292 out := new(MissingParamsResponse)
293 err := grpc.Invoke(ctx, "/traceservice.TraceService/MissingParams", in, out, c.cc, opts...)
294 if err != nil {
295 return nil, err
296 }
297 return out, nil
298 }
299
300 func (c *traceServiceClient) AddParams(ctx context.Context, in *AddParamsRequest , opts ...grpc.CallOption) (*EmptyResponse, error) {
301 out := new(EmptyResponse)
302 err := grpc.Invoke(ctx, "/traceservice.TraceService/AddParams", in, out, c.cc, opts...)
303 if err != nil {
304 return nil, err
305 }
306 return out, nil
307 }
308
309 func (c *traceServiceClient) Add(ctx context.Context, in *AddRequest, opts ...gr pc.CallOption) (*EmptyResponse, error) {
310 out := new(EmptyResponse)
311 err := grpc.Invoke(ctx, "/traceservice.TraceService/Add", in, out, c.cc, opts...)
312 if err != nil {
313 return nil, err
314 }
315 return out, nil
316 }
317
318 func (c *traceServiceClient) Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*EmptyResponse, error) {
319 out := new(EmptyResponse)
320 err := grpc.Invoke(ctx, "/traceservice.TraceService/Remove", in, out, c. cc, opts...)
321 if err != nil {
322 return nil, err
323 }
324 return out, nil
325 }
326
327 func (c *traceServiceClient) List(ctx context.Context, in *ListRequest, opts ... grpc.CallOption) (*ListResponse, error) {
328 out := new(ListResponse)
329 err := grpc.Invoke(ctx, "/traceservice.TraceService/List", in, out, c.cc , opts...)
330 if err != nil {
331 return nil, err
332 }
333 return out, nil
334 }
335
336 func (c *traceServiceClient) GetValues(ctx context.Context, in *GetValuesRequest , opts ...grpc.CallOption) (*GetValuesResponse, error) {
337 out := new(GetValuesResponse)
338 err := grpc.Invoke(ctx, "/traceservice.TraceService/GetValues", in, out, c.cc, opts...)
339 if err != nil {
340 return nil, err
341 }
342 return out, nil
343 }
344
345 func (c *traceServiceClient) GetParams(ctx context.Context, in *GetParamsRequest , opts ...grpc.CallOption) (*GetParamsResponse, error) {
346 out := new(GetParamsResponse)
347 err := grpc.Invoke(ctx, "/traceservice.TraceService/GetParams", in, out, c.cc, opts...)
348 if err != nil {
349 return nil, err
350 }
351 return out, nil
352 }
353
354 // Server API for TraceService service
355
356 type TraceServiceServer interface {
357 // Returns a list of traceids that don't have Params stored in the datas tore.
358 MissingParams(context.Context, *MissingParamsRequest) (*MissingParamsRes ponse, error)
359 // Adds Params for a set of traceids.
360 AddParams(context.Context, *AddParamsRequest) (*EmptyResponse, error)
361 // Adds data for a set of traces for a particular commitid.
362 Add(context.Context, *AddRequest) (*EmptyResponse, error)
363 // Removes data for a particular commitid.
364 Remove(context.Context, *RemoveRequest) (*EmptyResponse, error)
365 // List returns all the CommitIDs that exist in the given time range.
366 List(context.Context, *ListRequest) (*ListResponse, error)
367 // GetValues returns all the trace values stored for the given CommitID.
368 GetValues(context.Context, *GetValuesRequest) (*GetValuesResponse, error )
369 // GetParams returns the Params for all of the given traces.
370 GetParams(context.Context, *GetParamsRequest) (*GetParamsResponse, error )
371 }
372
373 func RegisterTraceServiceServer(s *grpc.Server, srv TraceServiceServer) {
374 s.RegisterService(&_TraceService_serviceDesc, srv)
375 }
376
377 func _TraceService_MissingParams_Handler(srv interface{}, ctx context.Context, d ec func(interface{}) error) (interface{}, error) {
378 in := new(MissingParamsRequest)
379 if err := dec(in); err != nil {
380 return nil, err
381 }
382 out, err := srv.(TraceServiceServer).MissingParams(ctx, in)
383 if err != nil {
384 return nil, err
385 }
386 return out, nil
387 }
388
389 func _TraceService_AddParams_Handler(srv interface{}, ctx context.Context, dec f unc(interface{}) error) (interface{}, error) {
390 in := new(AddParamsRequest)
391 if err := dec(in); err != nil {
392 return nil, err
393 }
394 out, err := srv.(TraceServiceServer).AddParams(ctx, in)
395 if err != nil {
396 return nil, err
397 }
398 return out, nil
399 }
400
401 func _TraceService_Add_Handler(srv interface{}, ctx context.Context, dec func(in terface{}) error) (interface{}, error) {
402 in := new(AddRequest)
403 if err := dec(in); err != nil {
404 return nil, err
405 }
406 out, err := srv.(TraceServiceServer).Add(ctx, in)
407 if err != nil {
408 return nil, err
409 }
410 return out, nil
411 }
412
413 func _TraceService_Remove_Handler(srv interface{}, ctx context.Context, dec func (interface{}) error) (interface{}, error) {
414 in := new(RemoveRequest)
415 if err := dec(in); err != nil {
416 return nil, err
417 }
418 out, err := srv.(TraceServiceServer).Remove(ctx, in)
419 if err != nil {
420 return nil, err
421 }
422 return out, nil
423 }
424
425 func _TraceService_List_Handler(srv interface{}, ctx context.Context, dec func(i nterface{}) error) (interface{}, error) {
426 in := new(ListRequest)
427 if err := dec(in); err != nil {
428 return nil, err
429 }
430 out, err := srv.(TraceServiceServer).List(ctx, in)
431 if err != nil {
432 return nil, err
433 }
434 return out, nil
435 }
436
437 func _TraceService_GetValues_Handler(srv interface{}, ctx context.Context, dec f unc(interface{}) error) (interface{}, error) {
438 in := new(GetValuesRequest)
439 if err := dec(in); err != nil {
440 return nil, err
441 }
442 out, err := srv.(TraceServiceServer).GetValues(ctx, in)
443 if err != nil {
444 return nil, err
445 }
446 return out, nil
447 }
448
449 func _TraceService_GetParams_Handler(srv interface{}, ctx context.Context, dec f unc(interface{}) error) (interface{}, error) {
450 in := new(GetParamsRequest)
451 if err := dec(in); err != nil {
452 return nil, err
453 }
454 out, err := srv.(TraceServiceServer).GetParams(ctx, in)
455 if err != nil {
456 return nil, err
457 }
458 return out, nil
459 }
460
461 var _TraceService_serviceDesc = grpc.ServiceDesc{
462 ServiceName: "traceservice.TraceService",
463 HandlerType: (*TraceServiceServer)(nil),
464 Methods: []grpc.MethodDesc{
465 {
466 MethodName: "MissingParams",
467 Handler: _TraceService_MissingParams_Handler,
468 },
469 {
470 MethodName: "AddParams",
471 Handler: _TraceService_AddParams_Handler,
472 },
473 {
474 MethodName: "Add",
475 Handler: _TraceService_Add_Handler,
476 },
477 {
478 MethodName: "Remove",
479 Handler: _TraceService_Remove_Handler,
480 },
481 {
482 MethodName: "List",
483 Handler: _TraceService_List_Handler,
484 },
485 {
486 MethodName: "GetValues",
487 Handler: _TraceService_GetValues_Handler,
488 },
489 {
490 MethodName: "GetParams",
491 Handler: _TraceService_GetParams_Handler,
492 },
493 },
494 Streams: []grpc.StreamDesc{},
495 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698