go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/logdog/api/endpoints/coordinator/registration/v1/service.pb.go (about)

     1  // Copyright 2016 The LUCI Authors. All rights reserved.
     2  // Use of this source code is governed under the Apache License, Version 2.0
     3  // that can be found in the LICENSE file.
     4  
     5  // Code generated by protoc-gen-go. DO NOT EDIT.
     6  // versions:
     7  // 	protoc-gen-go v1.31.0
     8  // 	protoc        v3.21.7
     9  // source: go.chromium.org/luci/logdog/api/endpoints/coordinator/registration/v1/service.proto
    10  
    11  package logdog
    12  
    13  import prpc "go.chromium.org/luci/grpc/prpc"
    14  
    15  import (
    16  	context "context"
    17  	grpc "google.golang.org/grpc"
    18  	codes "google.golang.org/grpc/codes"
    19  	status "google.golang.org/grpc/status"
    20  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    21  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    22  	durationpb "google.golang.org/protobuf/types/known/durationpb"
    23  	reflect "reflect"
    24  	sync "sync"
    25  )
    26  
    27  const (
    28  	// Verify that this generated code is sufficiently up-to-date.
    29  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    30  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    31  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    32  )
    33  
    34  // RegisterPrefixRequest registers a new Prefix with the Coordinator.
    35  type RegisterPrefixRequest struct {
    36  	state         protoimpl.MessageState
    37  	sizeCache     protoimpl.SizeCache
    38  	unknownFields protoimpl.UnknownFields
    39  
    40  	// The log stream's project.
    41  	Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
    42  	// The log stream prefix to register.
    43  	Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
    44  	// The realm name (within the project) to associate the stream prefix with.
    45  	//
    46  	// This realm contains ACLs defining who will be able to read logs under this
    47  	// prefix.
    48  	//
    49  	// The caller should have "logdog.logs.create" permission in this realm.
    50  	Realm string `protobuf:"bytes,5,opt,name=realm,proto3" json:"realm,omitempty"`
    51  	// Optional information about the registering agent.
    52  	SourceInfo []string `protobuf:"bytes,3,rep,name=source_info,json=sourceInfo,proto3" json:"source_info,omitempty"`
    53  	// Optional nonce to allow retries of this RPC. ALL CLIENTS SHOULD PROVIDE
    54  	// THIS. The client should generate the nonce once while preparing the request
    55  	// message, and then re-use the same nonce for retries of the request.
    56  	//
    57  	// The nonce should be 32 bytes of random data.
    58  	// The nonce must not be reused between different requests (only for retries
    59  	//
    60  	//	of the same request).
    61  	//
    62  	// NOTE: This is currently optional, but once all clients have upgraded to
    63  	// this scheme, it will become mandatory. During the transition if this is
    64  	// omitted, then NO RETRIES will be allowed for this request, if the server
    65  	// processes it correctly but the client fails to get the response from the
    66  	// server.
    67  	OpNonce []byte `protobuf:"bytes,4,opt,name=op_nonce,json=opNonce,proto3" json:"op_nonce,omitempty"`
    68  	// The prefix expiration time. If <= 0, the project's default prefix
    69  	// expiration period will be applied.
    70  	//
    71  	// The prefix will be closed by the Coordinator after its expiration period.
    72  	// Once closed, new stream registration requests will no longer be accepted.
    73  	//
    74  	// If supplied, this value should exceed the timeout of the local task, else
    75  	// some of the task's streams may be dropped due to failing registration.
    76  	Expiration *durationpb.Duration `protobuf:"bytes,10,opt,name=expiration,proto3" json:"expiration,omitempty"`
    77  }
    78  
    79  func (x *RegisterPrefixRequest) Reset() {
    80  	*x = RegisterPrefixRequest{}
    81  	if protoimpl.UnsafeEnabled {
    82  		mi := &file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes[0]
    83  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    84  		ms.StoreMessageInfo(mi)
    85  	}
    86  }
    87  
    88  func (x *RegisterPrefixRequest) String() string {
    89  	return protoimpl.X.MessageStringOf(x)
    90  }
    91  
    92  func (*RegisterPrefixRequest) ProtoMessage() {}
    93  
    94  func (x *RegisterPrefixRequest) ProtoReflect() protoreflect.Message {
    95  	mi := &file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes[0]
    96  	if protoimpl.UnsafeEnabled && x != nil {
    97  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    98  		if ms.LoadMessageInfo() == nil {
    99  			ms.StoreMessageInfo(mi)
   100  		}
   101  		return ms
   102  	}
   103  	return mi.MessageOf(x)
   104  }
   105  
   106  // Deprecated: Use RegisterPrefixRequest.ProtoReflect.Descriptor instead.
   107  func (*RegisterPrefixRequest) Descriptor() ([]byte, []int) {
   108  	return file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescGZIP(), []int{0}
   109  }
   110  
   111  func (x *RegisterPrefixRequest) GetProject() string {
   112  	if x != nil {
   113  		return x.Project
   114  	}
   115  	return ""
   116  }
   117  
   118  func (x *RegisterPrefixRequest) GetPrefix() string {
   119  	if x != nil {
   120  		return x.Prefix
   121  	}
   122  	return ""
   123  }
   124  
   125  func (x *RegisterPrefixRequest) GetRealm() string {
   126  	if x != nil {
   127  		return x.Realm
   128  	}
   129  	return ""
   130  }
   131  
   132  func (x *RegisterPrefixRequest) GetSourceInfo() []string {
   133  	if x != nil {
   134  		return x.SourceInfo
   135  	}
   136  	return nil
   137  }
   138  
   139  func (x *RegisterPrefixRequest) GetOpNonce() []byte {
   140  	if x != nil {
   141  		return x.OpNonce
   142  	}
   143  	return nil
   144  }
   145  
   146  func (x *RegisterPrefixRequest) GetExpiration() *durationpb.Duration {
   147  	if x != nil {
   148  		return x.Expiration
   149  	}
   150  	return nil
   151  }
   152  
   153  // The response message for the RegisterPrefix RPC.
   154  type RegisterPrefixResponse struct {
   155  	state         protoimpl.MessageState
   156  	sizeCache     protoimpl.SizeCache
   157  	unknownFields protoimpl.UnknownFields
   158  
   159  	// Secret is the prefix's secret. This must be included verbatim in Butler
   160  	// bundles to assert ownership of this prefix.
   161  	Secret []byte `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
   162  	// The name of the Pub/Sub topic to publish butlerproto-formatted Butler log
   163  	// bundles to.
   164  	LogBundleTopic string `protobuf:"bytes,2,opt,name=log_bundle_topic,json=logBundleTopic,proto3" json:"log_bundle_topic,omitempty"`
   165  }
   166  
   167  func (x *RegisterPrefixResponse) Reset() {
   168  	*x = RegisterPrefixResponse{}
   169  	if protoimpl.UnsafeEnabled {
   170  		mi := &file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes[1]
   171  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   172  		ms.StoreMessageInfo(mi)
   173  	}
   174  }
   175  
   176  func (x *RegisterPrefixResponse) String() string {
   177  	return protoimpl.X.MessageStringOf(x)
   178  }
   179  
   180  func (*RegisterPrefixResponse) ProtoMessage() {}
   181  
   182  func (x *RegisterPrefixResponse) ProtoReflect() protoreflect.Message {
   183  	mi := &file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes[1]
   184  	if protoimpl.UnsafeEnabled && x != nil {
   185  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   186  		if ms.LoadMessageInfo() == nil {
   187  			ms.StoreMessageInfo(mi)
   188  		}
   189  		return ms
   190  	}
   191  	return mi.MessageOf(x)
   192  }
   193  
   194  // Deprecated: Use RegisterPrefixResponse.ProtoReflect.Descriptor instead.
   195  func (*RegisterPrefixResponse) Descriptor() ([]byte, []int) {
   196  	return file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescGZIP(), []int{1}
   197  }
   198  
   199  func (x *RegisterPrefixResponse) GetSecret() []byte {
   200  	if x != nil {
   201  		return x.Secret
   202  	}
   203  	return nil
   204  }
   205  
   206  func (x *RegisterPrefixResponse) GetLogBundleTopic() string {
   207  	if x != nil {
   208  		return x.LogBundleTopic
   209  	}
   210  	return ""
   211  }
   212  
   213  var File_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto protoreflect.FileDescriptor
   214  
   215  var file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDesc = []byte{
   216  	0x0a, 0x53, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72,
   217  	0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x6c, 0x6f, 0x67, 0x64, 0x6f, 0x67, 0x2f, 0x61, 0x70,
   218  	0x69, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6f, 0x72,
   219  	0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61,
   220  	0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
   221  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x6c, 0x6f, 0x67, 0x64, 0x6f, 0x67, 0x1a, 0x1e, 0x67,
   222  	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64,
   223  	0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x01,
   224  	0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78,
   225  	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65,
   226  	0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
   227  	0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28,
   228  	0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61,
   229  	0x6c, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x12,
   230  	0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03,
   231  	0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f,
   232  	0x12, 0x19, 0x0a, 0x08, 0x6f, 0x70, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01,
   233  	0x28, 0x0c, 0x52, 0x07, 0x6f, 0x70, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x65,
   234  	0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32,
   235  	0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
   236  	0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69,
   237  	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5a, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
   238  	0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
   239  	0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
   240  	0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x6f, 0x67, 0x5f,
   241  	0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01,
   242  	0x28, 0x09, 0x52, 0x0e, 0x6c, 0x6f, 0x67, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x6f, 0x70,
   243  	0x69, 0x63, 0x32, 0x5f, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69,
   244  	0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72,
   245  	0x65, 0x66, 0x69, 0x78, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x67, 0x64, 0x6f, 0x67, 0x2e, 0x52, 0x65,
   246  	0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75,
   247  	0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6f, 0x67, 0x64, 0x6f, 0x67, 0x2e, 0x52, 0x65, 0x67,
   248  	0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f,
   249  	0x6e, 0x73, 0x65, 0x42, 0x4e, 0x5a, 0x4c, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69,
   250  	0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x6c, 0x6f, 0x67, 0x64,
   251  	0x6f, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73,
   252  	0x2f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x72, 0x65, 0x67,
   253  	0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x6c, 0x6f, 0x67,
   254  	0x64, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   255  }
   256  
   257  var (
   258  	file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescOnce sync.Once
   259  	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
   260  )
   261  
   262  func file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescGZIP() []byte {
   263  	file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescOnce.Do(func() {
   264  		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)
   265  	})
   266  	return file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDescData
   267  }
   268  
   269  var file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   270  var file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_goTypes = []interface{}{
   271  	(*RegisterPrefixRequest)(nil),  // 0: logdog.RegisterPrefixRequest
   272  	(*RegisterPrefixResponse)(nil), // 1: logdog.RegisterPrefixResponse
   273  	(*durationpb.Duration)(nil),    // 2: google.protobuf.Duration
   274  }
   275  var file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_depIdxs = []int32{
   276  	2, // 0: logdog.RegisterPrefixRequest.expiration:type_name -> google.protobuf.Duration
   277  	0, // 1: logdog.Registration.RegisterPrefix:input_type -> logdog.RegisterPrefixRequest
   278  	1, // 2: logdog.Registration.RegisterPrefix:output_type -> logdog.RegisterPrefixResponse
   279  	2, // [2:3] is the sub-list for method output_type
   280  	1, // [1:2] is the sub-list for method input_type
   281  	1, // [1:1] is the sub-list for extension type_name
   282  	1, // [1:1] is the sub-list for extension extendee
   283  	0, // [0:1] is the sub-list for field type_name
   284  }
   285  
   286  func init() {
   287  	file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_init()
   288  }
   289  func file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_init() {
   290  	if File_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto != nil {
   291  		return
   292  	}
   293  	if !protoimpl.UnsafeEnabled {
   294  		file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   295  			switch v := v.(*RegisterPrefixRequest); i {
   296  			case 0:
   297  				return &v.state
   298  			case 1:
   299  				return &v.sizeCache
   300  			case 2:
   301  				return &v.unknownFields
   302  			default:
   303  				return nil
   304  			}
   305  		}
   306  		file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   307  			switch v := v.(*RegisterPrefixResponse); i {
   308  			case 0:
   309  				return &v.state
   310  			case 1:
   311  				return &v.sizeCache
   312  			case 2:
   313  				return &v.unknownFields
   314  			default:
   315  				return nil
   316  			}
   317  		}
   318  	}
   319  	type x struct{}
   320  	out := protoimpl.TypeBuilder{
   321  		File: protoimpl.DescBuilder{
   322  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   323  			RawDescriptor: file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDesc,
   324  			NumEnums:      0,
   325  			NumMessages:   2,
   326  			NumExtensions: 0,
   327  			NumServices:   1,
   328  		},
   329  		GoTypes:           file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_goTypes,
   330  		DependencyIndexes: file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_depIdxs,
   331  		MessageInfos:      file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_msgTypes,
   332  	}.Build()
   333  	File_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto = out.File
   334  	file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_rawDesc = nil
   335  	file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_goTypes = nil
   336  	file_go_chromium_org_luci_logdog_api_endpoints_coordinator_registration_v1_service_proto_depIdxs = nil
   337  }
   338  
   339  // Reference imports to suppress errors if they are not otherwise used.
   340  var _ context.Context
   341  var _ grpc.ClientConnInterface
   342  
   343  // This is a compile-time assertion to ensure that this generated file
   344  // is compatible with the grpc package it is being compiled against.
   345  const _ = grpc.SupportPackageIsVersion6
   346  
   347  // RegistrationClient is the client API for Registration service.
   348  //
   349  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   350  type RegistrationClient interface {
   351  	// RegisterStream allows a Butler instance to register a log stream with the
   352  	// Coordinator. Upon success, the Coordinator will return registration
   353  	// information and streaming parameters to the Butler.
   354  	//
   355  	// This should be called by a Butler instance to gain the ability to publish
   356  	// to a prefix space. The caller must have WRITE access to its project's
   357  	// stream space. If WRITE access is not present, this will fail with the
   358  	// "PermissionDenied" gRPC code.
   359  	//
   360  	// A stream prefix may be registered at most once. Additional registration
   361  	// requests will fail with the "AlreadyExists" gRPC code.
   362  	RegisterPrefix(ctx context.Context, in *RegisterPrefixRequest, opts ...grpc.CallOption) (*RegisterPrefixResponse, error)
   363  }
   364  type registrationPRPCClient struct {
   365  	client *prpc.Client
   366  }
   367  
   368  func NewRegistrationPRPCClient(client *prpc.Client) RegistrationClient {
   369  	return &registrationPRPCClient{client}
   370  }
   371  
   372  func (c *registrationPRPCClient) RegisterPrefix(ctx context.Context, in *RegisterPrefixRequest, opts ...grpc.CallOption) (*RegisterPrefixResponse, error) {
   373  	out := new(RegisterPrefixResponse)
   374  	err := c.client.Call(ctx, "logdog.Registration", "RegisterPrefix", in, out, opts...)
   375  	if err != nil {
   376  		return nil, err
   377  	}
   378  	return out, nil
   379  }
   380  
   381  type registrationClient struct {
   382  	cc grpc.ClientConnInterface
   383  }
   384  
   385  func NewRegistrationClient(cc grpc.ClientConnInterface) RegistrationClient {
   386  	return &registrationClient{cc}
   387  }
   388  
   389  func (c *registrationClient) RegisterPrefix(ctx context.Context, in *RegisterPrefixRequest, opts ...grpc.CallOption) (*RegisterPrefixResponse, error) {
   390  	out := new(RegisterPrefixResponse)
   391  	err := c.cc.Invoke(ctx, "/logdog.Registration/RegisterPrefix", in, out, opts...)
   392  	if err != nil {
   393  		return nil, err
   394  	}
   395  	return out, nil
   396  }
   397  
   398  // RegistrationServer is the server API for Registration service.
   399  type RegistrationServer interface {
   400  	// RegisterStream allows a Butler instance to register a log stream with the
   401  	// Coordinator. Upon success, the Coordinator will return registration
   402  	// information and streaming parameters to the Butler.
   403  	//
   404  	// This should be called by a Butler instance to gain the ability to publish
   405  	// to a prefix space. The caller must have WRITE access to its project's
   406  	// stream space. If WRITE access is not present, this will fail with the
   407  	// "PermissionDenied" gRPC code.
   408  	//
   409  	// A stream prefix may be registered at most once. Additional registration
   410  	// requests will fail with the "AlreadyExists" gRPC code.
   411  	RegisterPrefix(context.Context, *RegisterPrefixRequest) (*RegisterPrefixResponse, error)
   412  }
   413  
   414  // UnimplementedRegistrationServer can be embedded to have forward compatible implementations.
   415  type UnimplementedRegistrationServer struct {
   416  }
   417  
   418  func (*UnimplementedRegistrationServer) RegisterPrefix(context.Context, *RegisterPrefixRequest) (*RegisterPrefixResponse, error) {
   419  	return nil, status.Errorf(codes.Unimplemented, "method RegisterPrefix not implemented")
   420  }
   421  
   422  func RegisterRegistrationServer(s prpc.Registrar, srv RegistrationServer) {
   423  	s.RegisterService(&_Registration_serviceDesc, srv)
   424  }
   425  
   426  func _Registration_RegisterPrefix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   427  	in := new(RegisterPrefixRequest)
   428  	if err := dec(in); err != nil {
   429  		return nil, err
   430  	}
   431  	if interceptor == nil {
   432  		return srv.(RegistrationServer).RegisterPrefix(ctx, in)
   433  	}
   434  	info := &grpc.UnaryServerInfo{
   435  		Server:     srv,
   436  		FullMethod: "/logdog.Registration/RegisterPrefix",
   437  	}
   438  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   439  		return srv.(RegistrationServer).RegisterPrefix(ctx, req.(*RegisterPrefixRequest))
   440  	}
   441  	return interceptor(ctx, in, info, handler)
   442  }
   443  
   444  var _Registration_serviceDesc = grpc.ServiceDesc{
   445  	ServiceName: "logdog.Registration",
   446  	HandlerType: (*RegistrationServer)(nil),
   447  	Methods: []grpc.MethodDesc{
   448  		{
   449  			MethodName: "RegisterPrefix",
   450  			Handler:    _Registration_RegisterPrefix_Handler,
   451  		},
   452  	},
   453  	Streams:  []grpc.StreamDesc{},
   454  	Metadata: "go.chromium.org/luci/logdog/api/endpoints/coordinator/registration/v1/service.proto",
   455  }