mirrored from https://chromium.googlesource.com/infra/luci/luci-go
/
service.pb.go
454 lines (407 loc) · 19.4 KB
/
service.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
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
// Copyright 2016 The LUCI Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.12.1
// source: go.chromium.org/luci/logdog/api/endpoints/coordinator/registration/v1/service.proto
package logdog
import prpc "go.chromium.org/luci/grpc/prpc"
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// RegisterPrefixRequest registers a new Prefix with the Coordinator.
type RegisterPrefixRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The log stream's project.
Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
// The log stream prefix to register.
Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
// The realm name (within the project) to associate the stream prefix with.
//
// This realm contains ACLs defining who will be able to read logs under this
// prefix.
//
// The caller should have "logdog.logs.create" permission in this realm.
Realm string `protobuf:"bytes,5,opt,name=realm,proto3" json:"realm,omitempty"`
// Optional information about the registering agent.
SourceInfo []string `protobuf:"bytes,3,rep,name=source_info,json=sourceInfo,proto3" json:"source_info,omitempty"`
// Optional nonce to allow retries of this RPC. ALL CLIENTS SHOULD PROVIDE
// THIS. The client should generate the nonce once while preparing the request
// message, and then re-use the same nonce for retries of the request.
//
// The nonce should be 32 bytes of random data.
// The nonce must not be reused between different requests (only for retries
// of the same request).
//
// NOTE: This is currently optional, but once all clients have upgraded to
// this scheme, it will become mandatory. During the transition if this is
// omitted, then NO RETRIES will be allowed for this request, if the server
// processes it correctly but the client fails to get the response from the
// server.
OpNonce []byte `protobuf:"bytes,4,opt,name=op_nonce,json=opNonce,proto3" json:"op_nonce,omitempty"`
// The prefix expiration time. If <= 0, the project's default prefix
// expiration period will be applied.
//
// The prefix will be closed by the Coordinator after its expiration period.
// Once closed, new stream registration requests will no longer be accepted.
//
// If supplied, this value should exceed the timeout of the local task, else
// some of the task's streams may be dropped due to failing registration.
Expiration *durationpb.Duration `protobuf:"bytes,10,opt,name=expiration,proto3" json:"expiration,omitempty"`
}
func (x *RegisterPrefixRequest) Reset() {
*x = RegisterPrefixRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RegisterPrefixRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RegisterPrefixRequest) ProtoMessage() {}
func (x *RegisterPrefixRequest) ProtoReflect() protoreflect.Message {
mi := &file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RegisterPrefixRequest.ProtoReflect.Descriptor instead.
func (*RegisterPrefixRequest) Descriptor() ([]byte, []int) {
return file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescGZIP(), []int{0}
}
func (x *RegisterPrefixRequest) GetProject() string {
if x != nil {
return x.Project
}
return ""
}
func (x *RegisterPrefixRequest) GetPrefix() string {
if x != nil {
return x.Prefix
}
return ""
}
func (x *RegisterPrefixRequest) GetRealm() string {
if x != nil {
return x.Realm
}
return ""
}
func (x *RegisterPrefixRequest) GetSourceInfo() []string {
if x != nil {
return x.SourceInfo
}
return nil
}
func (x *RegisterPrefixRequest) GetOpNonce() []byte {
if x != nil {
return x.OpNonce
}
return nil
}
func (x *RegisterPrefixRequest) GetExpiration() *durationpb.Duration {
if x != nil {
return x.Expiration
}
return nil
}
// The response message for the RegisterPrefix RPC.
type RegisterPrefixResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Secret is the prefix's secret. This must be included verbatim in Butler
// bundles to assert ownership of this prefix.
Secret []byte `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
// The name of the Pub/Sub topic to publish butlerproto-formatted Butler log
// bundles to.
LogBundleTopic string `protobuf:"bytes,2,opt,name=log_bundle_topic,json=logBundleTopic,proto3" json:"log_bundle_topic,omitempty"`
}
func (x *RegisterPrefixResponse) Reset() {
*x = RegisterPrefixResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RegisterPrefixResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RegisterPrefixResponse) ProtoMessage() {}
func (x *RegisterPrefixResponse) ProtoReflect() protoreflect.Message {
mi := &file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RegisterPrefixResponse.ProtoReflect.Descriptor instead.
func (*RegisterPrefixResponse) Descriptor() ([]byte, []int) {
return file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescGZIP(), []int{1}
}
func (x *RegisterPrefixResponse) GetSecret() []byte {
if x != nil {
return x.Secret
}
return nil
}
func (x *RegisterPrefixResponse) GetLogBundleTopic() string {
if x != nil {
return x.LogBundleTopic
}
return ""
}
var File_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto protoreflect.FileDescriptor
var file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDesc = []byte{
0x0a, 0x53, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72,
0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x6c, 0x6f, 0x67, 0x64, 0x6f, 0x67, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6f, 0x72,
0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x6c, 0x6f, 0x67, 0x64, 0x6f, 0x67, 0x1a, 0x1e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64,
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x01,
0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65,
0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61,
0x6c, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x12,
0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03,
0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x19, 0x0a, 0x08, 0x6f, 0x70, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x07, 0x6f, 0x70, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x65,
0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5a, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x6f, 0x67, 0x5f,
0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0e, 0x6c, 0x6f, 0x67, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x6f, 0x70,
0x69, 0x63, 0x32, 0x5f, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72,
0x65, 0x66, 0x69, 0x78, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x67, 0x64, 0x6f, 0x67, 0x2e, 0x52, 0x65,
0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6f, 0x67, 0x64, 0x6f, 0x67, 0x2e, 0x52, 0x65, 0x67,
0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x42, 0x4e, 0x5a, 0x4c, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69,
0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x6c, 0x6f, 0x67, 0x64,
0x6f, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73,
0x2f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x72, 0x65, 0x67,
0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x6c, 0x6f, 0x67,
0x64, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescOnce sync.Once
file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescData = file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDesc
)
func file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescGZIP() []byte {
file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescOnce.Do(func() {
file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescData)
})
return file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescData
}
var file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_goTypes = []interface{}{
(*RegisterPrefixRequest)(nil), // 0: logdog.RegisterPrefixRequest
(*RegisterPrefixResponse)(nil), // 1: logdog.RegisterPrefixResponse
(*durationpb.Duration)(nil), // 2: google.protobuf.Duration
}
var file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_depIdxs = []int32{
2, // 0: logdog.RegisterPrefixRequest.expiration:type_name -> google.protobuf.Duration
0, // 1: logdog.Registration.RegisterPrefix:input_type -> logdog.RegisterPrefixRequest
1, // 2: logdog.Registration.RegisterPrefix:output_type -> logdog.RegisterPrefixResponse
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() {
file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_init()
}
func file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_init() {
if File_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RegisterPrefixRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RegisterPrefixResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_goTypes,
DependencyIndexes: file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_depIdxs,
MessageInfos: file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes,
}.Build()
File_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto = out.File
file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDesc = nil
file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_goTypes = nil
file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// RegistrationClient is the client API for Registration service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type RegistrationClient interface {
// RegisterStream allows a Butler instance to register a log stream with the
// Coordinator. Upon success, the Coordinator will return registration
// information and streaming parameters to the Butler.
//
// This should be called by a Butler instance to gain the ability to publish
// to a prefix space. The caller must have WRITE access to its project's
// stream space. If WRITE access is not present, this will fail with the
// "PermissionDenied" gRPC code.
//
// A stream prefix may be registered at most once. Additional registration
// requests will fail with the "AlreadyExists" gRPC code.
RegisterPrefix(ctx context.Context, in *RegisterPrefixRequest, opts ...grpc.CallOption) (*RegisterPrefixResponse, error)
}
type registrationPRPCClient struct {
client *prpc.Client
}
func NewRegistrationPRPCClient(client *prpc.Client) RegistrationClient {
return ®istrationPRPCClient{client}
}
func (c *registrationPRPCClient) RegisterPrefix(ctx context.Context, in *RegisterPrefixRequest, opts ...grpc.CallOption) (*RegisterPrefixResponse, error) {
out := new(RegisterPrefixResponse)
err := c.client.Call(ctx, "logdog.Registration", "RegisterPrefix", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
type registrationClient struct {
cc grpc.ClientConnInterface
}
func NewRegistrationClient(cc grpc.ClientConnInterface) RegistrationClient {
return ®istrationClient{cc}
}
func (c *registrationClient) RegisterPrefix(ctx context.Context, in *RegisterPrefixRequest, opts ...grpc.CallOption) (*RegisterPrefixResponse, error) {
out := new(RegisterPrefixResponse)
err := c.cc.Invoke(ctx, "/logdog.Registration/RegisterPrefix", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// RegistrationServer is the server API for Registration service.
type RegistrationServer interface {
// RegisterStream allows a Butler instance to register a log stream with the
// Coordinator. Upon success, the Coordinator will return registration
// information and streaming parameters to the Butler.
//
// This should be called by a Butler instance to gain the ability to publish
// to a prefix space. The caller must have WRITE access to its project's
// stream space. If WRITE access is not present, this will fail with the
// "PermissionDenied" gRPC code.
//
// A stream prefix may be registered at most once. Additional registration
// requests will fail with the "AlreadyExists" gRPC code.
RegisterPrefix(context.Context, *RegisterPrefixRequest) (*RegisterPrefixResponse, error)
}
// UnimplementedRegistrationServer can be embedded to have forward compatible implementations.
type UnimplementedRegistrationServer struct {
}
func (*UnimplementedRegistrationServer) RegisterPrefix(context.Context, *RegisterPrefixRequest) (*RegisterPrefixResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterPrefix not implemented")
}
func RegisterRegistrationServer(s prpc.Registrar, srv RegistrationServer) {
s.RegisterService(&_Registration_serviceDesc, srv)
}
func _Registration_RegisterPrefix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegisterPrefixRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RegistrationServer).RegisterPrefix(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/logdog.Registration/RegisterPrefix",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RegistrationServer).RegisterPrefix(ctx, req.(*RegisterPrefixRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Registration_serviceDesc = grpc.ServiceDesc{
ServiceName: "logdog.Registration",
HandlerType: (*RegistrationServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "RegisterPrefix",
Handler: _Registration_RegisterPrefix_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "go.chromium.org/luci/logdog/api/endpoints/coordinator/registration/v1/service.proto",
}