| OLD | NEW |
| (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 // The parameters for the trace. |
| 119 Params *Params `protobuf:"bytes,2,opt,name=params" json:"params,omitempt
y"` |
| 120 } |
| 121 |
| 122 func (m *StoredEntry) Reset() { *m = StoredEntry{} } |
| 123 func (m *StoredEntry) String() string { return proto.CompactTextString(m) } |
| 124 func (*StoredEntry) ProtoMessage() {} |
| 125 |
| 126 func (m *StoredEntry) GetParams() *Params { |
| 127 if m != nil { |
| 128 return m.Params |
| 129 } |
| 130 return nil |
| 131 } |
| 132 |
| 133 type AddRequest struct { |
| 134 // The id of the commit/trybot we are adding data about. |
| 135 Commitid *CommitID `protobuf:"bytes,1,opt,name=commitid" json:"commitid,
omitempty"` |
| 136 // A map of traceid to Entry. |
| 137 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"` |
| 138 } |
| 139 |
| 140 func (m *AddRequest) Reset() { *m = AddRequest{} } |
| 141 func (m *AddRequest) String() string { return proto.CompactTextString(m) } |
| 142 func (*AddRequest) ProtoMessage() {} |
| 143 |
| 144 func (m *AddRequest) GetCommitid() *CommitID { |
| 145 if m != nil { |
| 146 return m.Commitid |
| 147 } |
| 148 return nil |
| 149 } |
| 150 |
| 151 func (m *AddRequest) GetEntries() map[string][]byte { |
| 152 if m != nil { |
| 153 return m.Entries |
| 154 } |
| 155 return nil |
| 156 } |
| 157 |
| 158 type RemoveRequest struct { |
| 159 // The id of the commit/trybot we are removing. |
| 160 Commitid *CommitID `protobuf:"bytes,1,opt,name=commitid" json:"commitid,
omitempty"` |
| 161 } |
| 162 |
| 163 func (m *RemoveRequest) Reset() { *m = RemoveRequest{} } |
| 164 func (m *RemoveRequest) String() string { return proto.CompactTextString(m) } |
| 165 func (*RemoveRequest) ProtoMessage() {} |
| 166 |
| 167 func (m *RemoveRequest) GetCommitid() *CommitID { |
| 168 if m != nil { |
| 169 return m.Commitid |
| 170 } |
| 171 return nil |
| 172 } |
| 173 |
| 174 type ListRequest struct { |
| 175 // begin is the unix timestamp to start searching from. |
| 176 Begin int64 `protobuf:"varint,1,opt,name=begin" json:"begin,omitempty"` |
| 177 // end is the unix timestamp to search to (inclusive). |
| 178 End int64 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` |
| 179 } |
| 180 |
| 181 func (m *ListRequest) Reset() { *m = ListRequest{} } |
| 182 func (m *ListRequest) String() string { return proto.CompactTextString(m) } |
| 183 func (*ListRequest) ProtoMessage() {} |
| 184 |
| 185 type ListResponse struct { |
| 186 // A list of CommitIDs that fall between the given timestamps in |
| 187 // ListRequest. |
| 188 Commitids []*CommitID `protobuf:"bytes,3,rep,name=commitids" json:"commi
tids,omitempty"` |
| 189 } |
| 190 |
| 191 func (m *ListResponse) Reset() { *m = ListResponse{} } |
| 192 func (m *ListResponse) String() string { return proto.CompactTextString(m) } |
| 193 func (*ListResponse) ProtoMessage() {} |
| 194 |
| 195 func (m *ListResponse) GetCommitids() []*CommitID { |
| 196 if m != nil { |
| 197 return m.Commitids |
| 198 } |
| 199 return nil |
| 200 } |
| 201 |
| 202 type GetValuesRequest struct { |
| 203 Commitid *CommitID `protobuf:"bytes,1,opt,name=commitid" json:"commitid,
omitempty"` |
| 204 } |
| 205 |
| 206 func (m *GetValuesRequest) Reset() { *m = GetValuesRequest{} } |
| 207 func (m *GetValuesRequest) String() string { return proto.CompactTextString(m) } |
| 208 func (*GetValuesRequest) ProtoMessage() {} |
| 209 |
| 210 func (m *GetValuesRequest) GetCommitid() *CommitID { |
| 211 if m != nil { |
| 212 return m.Commitid |
| 213 } |
| 214 return nil |
| 215 } |
| 216 |
| 217 type GetValuesResponse struct { |
| 218 // Maps traceid's to their []byte serialized values. |
| 219 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"` |
| 220 } |
| 221 |
| 222 func (m *GetValuesResponse) Reset() { *m = GetValuesResponse{} } |
| 223 func (m *GetValuesResponse) String() string { return proto.CompactTextString(m)
} |
| 224 func (*GetValuesResponse) ProtoMessage() {} |
| 225 |
| 226 func (m *GetValuesResponse) GetValues() map[string][]byte { |
| 227 if m != nil { |
| 228 return m.Values |
| 229 } |
| 230 return nil |
| 231 } |
| 232 |
| 233 type GetParamsRequest struct { |
| 234 // A list of traceids. |
| 235 Traceids []string `protobuf:"bytes,1,rep,name=traceids" json:"traceids,o
mitempty"` |
| 236 } |
| 237 |
| 238 func (m *GetParamsRequest) Reset() { *m = GetParamsRequest{} } |
| 239 func (m *GetParamsRequest) String() string { return proto.CompactTextString(m) } |
| 240 func (*GetParamsRequest) ProtoMessage() {} |
| 241 |
| 242 type GetParamsResponse struct { |
| 243 // Maps traceids to their Params. |
| 244 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"` |
| 245 } |
| 246 |
| 247 func (m *GetParamsResponse) Reset() { *m = GetParamsResponse{} } |
| 248 func (m *GetParamsResponse) String() string { return proto.CompactTextString(m)
} |
| 249 func (*GetParamsResponse) ProtoMessage() {} |
| 250 |
| 251 func (m *GetParamsResponse) GetParams() map[string]*Params { |
| 252 if m != nil { |
| 253 return m.Params |
| 254 } |
| 255 return nil |
| 256 } |
| 257 |
| 258 // Reference imports to suppress errors if they are not otherwise used. |
| 259 var _ context.Context |
| 260 var _ grpc.ClientConn |
| 261 |
| 262 // Client API for TraceService service |
| 263 |
| 264 type TraceServiceClient interface { |
| 265 // Returns a list of traceids that don't have Params stored in the datas
tore. |
| 266 MissingParams(ctx context.Context, in *MissingParamsRequest, opts ...grp
c.CallOption) (*MissingParamsResponse, error) |
| 267 // Adds Params for a set of traceids. |
| 268 AddParams(ctx context.Context, in *AddParamsRequest, opts ...grpc.CallOp
tion) (*EmptyResponse, error) |
| 269 // Adds data for a set of traces for a particular commitid. |
| 270 Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*Empt
yResponse, error) |
| 271 // Removes data for a particular commitid. |
| 272 Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption)
(*EmptyResponse, error) |
| 273 // List returns all the CommitIDs that exist in the given time range. |
| 274 List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*Li
stResponse, error) |
| 275 // GetValues returns all the trace values stored for the given CommitID. |
| 276 GetValues(ctx context.Context, in *GetValuesRequest, opts ...grpc.CallOp
tion) (*GetValuesResponse, error) |
| 277 // GetParams returns the Params for all of the given traces. |
| 278 GetParams(ctx context.Context, in *GetParamsRequest, opts ...grpc.CallOp
tion) (*GetParamsResponse, error) |
| 279 } |
| 280 |
| 281 type traceServiceClient struct { |
| 282 cc *grpc.ClientConn |
| 283 } |
| 284 |
| 285 func NewTraceServiceClient(cc *grpc.ClientConn) TraceServiceClient { |
| 286 return &traceServiceClient{cc} |
| 287 } |
| 288 |
| 289 func (c *traceServiceClient) MissingParams(ctx context.Context, in *MissingParam
sRequest, opts ...grpc.CallOption) (*MissingParamsResponse, error) { |
| 290 out := new(MissingParamsResponse) |
| 291 err := grpc.Invoke(ctx, "/traceservice.TraceService/MissingParams", in,
out, c.cc, opts...) |
| 292 if err != nil { |
| 293 return nil, err |
| 294 } |
| 295 return out, nil |
| 296 } |
| 297 |
| 298 func (c *traceServiceClient) AddParams(ctx context.Context, in *AddParamsRequest
, opts ...grpc.CallOption) (*EmptyResponse, error) { |
| 299 out := new(EmptyResponse) |
| 300 err := grpc.Invoke(ctx, "/traceservice.TraceService/AddParams", in, out,
c.cc, opts...) |
| 301 if err != nil { |
| 302 return nil, err |
| 303 } |
| 304 return out, nil |
| 305 } |
| 306 |
| 307 func (c *traceServiceClient) Add(ctx context.Context, in *AddRequest, opts ...gr
pc.CallOption) (*EmptyResponse, error) { |
| 308 out := new(EmptyResponse) |
| 309 err := grpc.Invoke(ctx, "/traceservice.TraceService/Add", in, out, c.cc,
opts...) |
| 310 if err != nil { |
| 311 return nil, err |
| 312 } |
| 313 return out, nil |
| 314 } |
| 315 |
| 316 func (c *traceServiceClient) Remove(ctx context.Context, in *RemoveRequest, opts
...grpc.CallOption) (*EmptyResponse, error) { |
| 317 out := new(EmptyResponse) |
| 318 err := grpc.Invoke(ctx, "/traceservice.TraceService/Remove", in, out, c.
cc, opts...) |
| 319 if err != nil { |
| 320 return nil, err |
| 321 } |
| 322 return out, nil |
| 323 } |
| 324 |
| 325 func (c *traceServiceClient) List(ctx context.Context, in *ListRequest, opts ...
grpc.CallOption) (*ListResponse, error) { |
| 326 out := new(ListResponse) |
| 327 err := grpc.Invoke(ctx, "/traceservice.TraceService/List", in, out, c.cc
, opts...) |
| 328 if err != nil { |
| 329 return nil, err |
| 330 } |
| 331 return out, nil |
| 332 } |
| 333 |
| 334 func (c *traceServiceClient) GetValues(ctx context.Context, in *GetValuesRequest
, opts ...grpc.CallOption) (*GetValuesResponse, error) { |
| 335 out := new(GetValuesResponse) |
| 336 err := grpc.Invoke(ctx, "/traceservice.TraceService/GetValues", in, out,
c.cc, opts...) |
| 337 if err != nil { |
| 338 return nil, err |
| 339 } |
| 340 return out, nil |
| 341 } |
| 342 |
| 343 func (c *traceServiceClient) GetParams(ctx context.Context, in *GetParamsRequest
, opts ...grpc.CallOption) (*GetParamsResponse, error) { |
| 344 out := new(GetParamsResponse) |
| 345 err := grpc.Invoke(ctx, "/traceservice.TraceService/GetParams", in, out,
c.cc, opts...) |
| 346 if err != nil { |
| 347 return nil, err |
| 348 } |
| 349 return out, nil |
| 350 } |
| 351 |
| 352 // Server API for TraceService service |
| 353 |
| 354 type TraceServiceServer interface { |
| 355 // Returns a list of traceids that don't have Params stored in the datas
tore. |
| 356 MissingParams(context.Context, *MissingParamsRequest) (*MissingParamsRes
ponse, error) |
| 357 // Adds Params for a set of traceids. |
| 358 AddParams(context.Context, *AddParamsRequest) (*EmptyResponse, error) |
| 359 // Adds data for a set of traces for a particular commitid. |
| 360 Add(context.Context, *AddRequest) (*EmptyResponse, error) |
| 361 // Removes data for a particular commitid. |
| 362 Remove(context.Context, *RemoveRequest) (*EmptyResponse, error) |
| 363 // List returns all the CommitIDs that exist in the given time range. |
| 364 List(context.Context, *ListRequest) (*ListResponse, error) |
| 365 // GetValues returns all the trace values stored for the given CommitID. |
| 366 GetValues(context.Context, *GetValuesRequest) (*GetValuesResponse, error
) |
| 367 // GetParams returns the Params for all of the given traces. |
| 368 GetParams(context.Context, *GetParamsRequest) (*GetParamsResponse, error
) |
| 369 } |
| 370 |
| 371 func RegisterTraceServiceServer(s *grpc.Server, srv TraceServiceServer) { |
| 372 s.RegisterService(&_TraceService_serviceDesc, srv) |
| 373 } |
| 374 |
| 375 func _TraceService_MissingParams_Handler(srv interface{}, ctx context.Context, d
ec func(interface{}) error) (interface{}, error) { |
| 376 in := new(MissingParamsRequest) |
| 377 if err := dec(in); err != nil { |
| 378 return nil, err |
| 379 } |
| 380 out, err := srv.(TraceServiceServer).MissingParams(ctx, in) |
| 381 if err != nil { |
| 382 return nil, err |
| 383 } |
| 384 return out, nil |
| 385 } |
| 386 |
| 387 func _TraceService_AddParams_Handler(srv interface{}, ctx context.Context, dec f
unc(interface{}) error) (interface{}, error) { |
| 388 in := new(AddParamsRequest) |
| 389 if err := dec(in); err != nil { |
| 390 return nil, err |
| 391 } |
| 392 out, err := srv.(TraceServiceServer).AddParams(ctx, in) |
| 393 if err != nil { |
| 394 return nil, err |
| 395 } |
| 396 return out, nil |
| 397 } |
| 398 |
| 399 func _TraceService_Add_Handler(srv interface{}, ctx context.Context, dec func(in
terface{}) error) (interface{}, error) { |
| 400 in := new(AddRequest) |
| 401 if err := dec(in); err != nil { |
| 402 return nil, err |
| 403 } |
| 404 out, err := srv.(TraceServiceServer).Add(ctx, in) |
| 405 if err != nil { |
| 406 return nil, err |
| 407 } |
| 408 return out, nil |
| 409 } |
| 410 |
| 411 func _TraceService_Remove_Handler(srv interface{}, ctx context.Context, dec func
(interface{}) error) (interface{}, error) { |
| 412 in := new(RemoveRequest) |
| 413 if err := dec(in); err != nil { |
| 414 return nil, err |
| 415 } |
| 416 out, err := srv.(TraceServiceServer).Remove(ctx, in) |
| 417 if err != nil { |
| 418 return nil, err |
| 419 } |
| 420 return out, nil |
| 421 } |
| 422 |
| 423 func _TraceService_List_Handler(srv interface{}, ctx context.Context, dec func(i
nterface{}) error) (interface{}, error) { |
| 424 in := new(ListRequest) |
| 425 if err := dec(in); err != nil { |
| 426 return nil, err |
| 427 } |
| 428 out, err := srv.(TraceServiceServer).List(ctx, in) |
| 429 if err != nil { |
| 430 return nil, err |
| 431 } |
| 432 return out, nil |
| 433 } |
| 434 |
| 435 func _TraceService_GetValues_Handler(srv interface{}, ctx context.Context, dec f
unc(interface{}) error) (interface{}, error) { |
| 436 in := new(GetValuesRequest) |
| 437 if err := dec(in); err != nil { |
| 438 return nil, err |
| 439 } |
| 440 out, err := srv.(TraceServiceServer).GetValues(ctx, in) |
| 441 if err != nil { |
| 442 return nil, err |
| 443 } |
| 444 return out, nil |
| 445 } |
| 446 |
| 447 func _TraceService_GetParams_Handler(srv interface{}, ctx context.Context, dec f
unc(interface{}) error) (interface{}, error) { |
| 448 in := new(GetParamsRequest) |
| 449 if err := dec(in); err != nil { |
| 450 return nil, err |
| 451 } |
| 452 out, err := srv.(TraceServiceServer).GetParams(ctx, in) |
| 453 if err != nil { |
| 454 return nil, err |
| 455 } |
| 456 return out, nil |
| 457 } |
| 458 |
| 459 var _TraceService_serviceDesc = grpc.ServiceDesc{ |
| 460 ServiceName: "traceservice.TraceService", |
| 461 HandlerType: (*TraceServiceServer)(nil), |
| 462 Methods: []grpc.MethodDesc{ |
| 463 { |
| 464 MethodName: "MissingParams", |
| 465 Handler: _TraceService_MissingParams_Handler, |
| 466 }, |
| 467 { |
| 468 MethodName: "AddParams", |
| 469 Handler: _TraceService_AddParams_Handler, |
| 470 }, |
| 471 { |
| 472 MethodName: "Add", |
| 473 Handler: _TraceService_Add_Handler, |
| 474 }, |
| 475 { |
| 476 MethodName: "Remove", |
| 477 Handler: _TraceService_Remove_Handler, |
| 478 }, |
| 479 { |
| 480 MethodName: "List", |
| 481 Handler: _TraceService_List_Handler, |
| 482 }, |
| 483 { |
| 484 MethodName: "GetValues", |
| 485 Handler: _TraceService_GetValues_Handler, |
| 486 }, |
| 487 { |
| 488 MethodName: "GetParams", |
| 489 Handler: _TraceService_GetParams_Handler, |
| 490 }, |
| 491 }, |
| 492 Streams: []grpc.StreamDesc{}, |
| 493 } |
| OLD | NEW |