go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/grpc/discovery/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/grpc/discovery/service.proto 10 11 package discovery 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 descriptorpb "google.golang.org/protobuf/types/descriptorpb" 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 // Void is an empty message. 35 type Void struct { 36 state protoimpl.MessageState 37 sizeCache protoimpl.SizeCache 38 unknownFields protoimpl.UnknownFields 39 } 40 41 func (x *Void) Reset() { 42 *x = Void{} 43 if protoimpl.UnsafeEnabled { 44 mi := &file_go_chromium_org_luci_grpc_discovery_service_proto_msgTypes[0] 45 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 46 ms.StoreMessageInfo(mi) 47 } 48 } 49 50 func (x *Void) String() string { 51 return protoimpl.X.MessageStringOf(x) 52 } 53 54 func (*Void) ProtoMessage() {} 55 56 func (x *Void) ProtoReflect() protoreflect.Message { 57 mi := &file_go_chromium_org_luci_grpc_discovery_service_proto_msgTypes[0] 58 if protoimpl.UnsafeEnabled && x != nil { 59 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 60 if ms.LoadMessageInfo() == nil { 61 ms.StoreMessageInfo(mi) 62 } 63 return ms 64 } 65 return mi.MessageOf(x) 66 } 67 68 // Deprecated: Use Void.ProtoReflect.Descriptor instead. 69 func (*Void) Descriptor() ([]byte, []int) { 70 return file_go_chromium_org_luci_grpc_discovery_service_proto_rawDescGZIP(), []int{0} 71 } 72 73 // DescribeResponse describes services. 74 type DescribeResponse struct { 75 state protoimpl.MessageState 76 sizeCache protoimpl.SizeCache 77 unknownFields protoimpl.UnknownFields 78 79 // Description contains descriptions of all services, their types and all 80 // transitive dependencies. 81 Description *descriptorpb.FileDescriptorSet `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` 82 // Services are service names provided by a server. 83 Services []string `protobuf:"bytes,2,rep,name=services,proto3" json:"services,omitempty"` 84 } 85 86 func (x *DescribeResponse) Reset() { 87 *x = DescribeResponse{} 88 if protoimpl.UnsafeEnabled { 89 mi := &file_go_chromium_org_luci_grpc_discovery_service_proto_msgTypes[1] 90 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 91 ms.StoreMessageInfo(mi) 92 } 93 } 94 95 func (x *DescribeResponse) String() string { 96 return protoimpl.X.MessageStringOf(x) 97 } 98 99 func (*DescribeResponse) ProtoMessage() {} 100 101 func (x *DescribeResponse) ProtoReflect() protoreflect.Message { 102 mi := &file_go_chromium_org_luci_grpc_discovery_service_proto_msgTypes[1] 103 if protoimpl.UnsafeEnabled && x != nil { 104 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 105 if ms.LoadMessageInfo() == nil { 106 ms.StoreMessageInfo(mi) 107 } 108 return ms 109 } 110 return mi.MessageOf(x) 111 } 112 113 // Deprecated: Use DescribeResponse.ProtoReflect.Descriptor instead. 114 func (*DescribeResponse) Descriptor() ([]byte, []int) { 115 return file_go_chromium_org_luci_grpc_discovery_service_proto_rawDescGZIP(), []int{1} 116 } 117 118 func (x *DescribeResponse) GetDescription() *descriptorpb.FileDescriptorSet { 119 if x != nil { 120 return x.Description 121 } 122 return nil 123 } 124 125 func (x *DescribeResponse) GetServices() []string { 126 if x != nil { 127 return x.Services 128 } 129 return nil 130 } 131 132 var File_go_chromium_org_luci_grpc_discovery_service_proto protoreflect.FileDescriptor 133 134 var file_go_chromium_org_luci_grpc_discovery_service_proto_rawDesc = []byte{ 135 0x0a, 0x31, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 136 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x64, 0x69, 0x73, 0x63, 137 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 138 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x1a, 0x20, 139 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 140 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 141 0x22, 0x06, 0x0a, 0x04, 0x56, 0x6f, 0x69, 0x64, 0x22, 0x74, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x63, 142 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0b, 143 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 144 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 145 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 146 0x6f, 0x72, 0x53, 0x65, 0x74, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 147 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 148 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x32, 0x47, 149 0x0a, 0x09, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x08, 0x44, 150 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x0f, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 151 0x65, 0x72, 0x79, 0x2e, 0x56, 0x6f, 0x69, 0x64, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 152 0x76, 0x65, 0x72, 0x79, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 153 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x25, 0x5a, 0x23, 0x67, 0x6f, 0x2e, 0x63, 0x68, 154 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 155 0x67, 0x72, 0x70, 0x63, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x62, 0x06, 156 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 157 } 158 159 var ( 160 file_go_chromium_org_luci_grpc_discovery_service_proto_rawDescOnce sync.Once 161 file_go_chromium_org_luci_grpc_discovery_service_proto_rawDescData = file_go_chromium_org_luci_grpc_discovery_service_proto_rawDesc 162 ) 163 164 func file_go_chromium_org_luci_grpc_discovery_service_proto_rawDescGZIP() []byte { 165 file_go_chromium_org_luci_grpc_discovery_service_proto_rawDescOnce.Do(func() { 166 file_go_chromium_org_luci_grpc_discovery_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_grpc_discovery_service_proto_rawDescData) 167 }) 168 return file_go_chromium_org_luci_grpc_discovery_service_proto_rawDescData 169 } 170 171 var file_go_chromium_org_luci_grpc_discovery_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 172 var file_go_chromium_org_luci_grpc_discovery_service_proto_goTypes = []interface{}{ 173 (*Void)(nil), // 0: discovery.Void 174 (*DescribeResponse)(nil), // 1: discovery.DescribeResponse 175 (*descriptorpb.FileDescriptorSet)(nil), // 2: google.protobuf.FileDescriptorSet 176 } 177 var file_go_chromium_org_luci_grpc_discovery_service_proto_depIdxs = []int32{ 178 2, // 0: discovery.DescribeResponse.description:type_name -> google.protobuf.FileDescriptorSet 179 0, // 1: discovery.Discovery.Describe:input_type -> discovery.Void 180 1, // 2: discovery.Discovery.Describe:output_type -> discovery.DescribeResponse 181 2, // [2:3] is the sub-list for method output_type 182 1, // [1:2] is the sub-list for method input_type 183 1, // [1:1] is the sub-list for extension type_name 184 1, // [1:1] is the sub-list for extension extendee 185 0, // [0:1] is the sub-list for field type_name 186 } 187 188 func init() { file_go_chromium_org_luci_grpc_discovery_service_proto_init() } 189 func file_go_chromium_org_luci_grpc_discovery_service_proto_init() { 190 if File_go_chromium_org_luci_grpc_discovery_service_proto != nil { 191 return 192 } 193 if !protoimpl.UnsafeEnabled { 194 file_go_chromium_org_luci_grpc_discovery_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 195 switch v := v.(*Void); i { 196 case 0: 197 return &v.state 198 case 1: 199 return &v.sizeCache 200 case 2: 201 return &v.unknownFields 202 default: 203 return nil 204 } 205 } 206 file_go_chromium_org_luci_grpc_discovery_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 207 switch v := v.(*DescribeResponse); i { 208 case 0: 209 return &v.state 210 case 1: 211 return &v.sizeCache 212 case 2: 213 return &v.unknownFields 214 default: 215 return nil 216 } 217 } 218 } 219 type x struct{} 220 out := protoimpl.TypeBuilder{ 221 File: protoimpl.DescBuilder{ 222 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 223 RawDescriptor: file_go_chromium_org_luci_grpc_discovery_service_proto_rawDesc, 224 NumEnums: 0, 225 NumMessages: 2, 226 NumExtensions: 0, 227 NumServices: 1, 228 }, 229 GoTypes: file_go_chromium_org_luci_grpc_discovery_service_proto_goTypes, 230 DependencyIndexes: file_go_chromium_org_luci_grpc_discovery_service_proto_depIdxs, 231 MessageInfos: file_go_chromium_org_luci_grpc_discovery_service_proto_msgTypes, 232 }.Build() 233 File_go_chromium_org_luci_grpc_discovery_service_proto = out.File 234 file_go_chromium_org_luci_grpc_discovery_service_proto_rawDesc = nil 235 file_go_chromium_org_luci_grpc_discovery_service_proto_goTypes = nil 236 file_go_chromium_org_luci_grpc_discovery_service_proto_depIdxs = nil 237 } 238 239 // Reference imports to suppress errors if they are not otherwise used. 240 var _ context.Context 241 var _ grpc.ClientConnInterface 242 243 // This is a compile-time assertion to ensure that this generated file 244 // is compatible with the grpc package it is being compiled against. 245 const _ = grpc.SupportPackageIsVersion6 246 247 // DiscoveryClient is the client API for Discovery service. 248 // 249 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 250 type DiscoveryClient interface { 251 // Describe returns a list of services and a descriptor.FileDescriptorSet 252 // that covers them all. 253 Describe(ctx context.Context, in *Void, opts ...grpc.CallOption) (*DescribeResponse, error) 254 } 255 type discoveryPRPCClient struct { 256 client *prpc.Client 257 } 258 259 func NewDiscoveryPRPCClient(client *prpc.Client) DiscoveryClient { 260 return &discoveryPRPCClient{client} 261 } 262 263 func (c *discoveryPRPCClient) Describe(ctx context.Context, in *Void, opts ...grpc.CallOption) (*DescribeResponse, error) { 264 out := new(DescribeResponse) 265 err := c.client.Call(ctx, "discovery.Discovery", "Describe", in, out, opts...) 266 if err != nil { 267 return nil, err 268 } 269 return out, nil 270 } 271 272 type discoveryClient struct { 273 cc grpc.ClientConnInterface 274 } 275 276 func NewDiscoveryClient(cc grpc.ClientConnInterface) DiscoveryClient { 277 return &discoveryClient{cc} 278 } 279 280 func (c *discoveryClient) Describe(ctx context.Context, in *Void, opts ...grpc.CallOption) (*DescribeResponse, error) { 281 out := new(DescribeResponse) 282 err := c.cc.Invoke(ctx, "/discovery.Discovery/Describe", in, out, opts...) 283 if err != nil { 284 return nil, err 285 } 286 return out, nil 287 } 288 289 // DiscoveryServer is the server API for Discovery service. 290 type DiscoveryServer interface { 291 // Describe returns a list of services and a descriptor.FileDescriptorSet 292 // that covers them all. 293 Describe(context.Context, *Void) (*DescribeResponse, error) 294 } 295 296 // UnimplementedDiscoveryServer can be embedded to have forward compatible implementations. 297 type UnimplementedDiscoveryServer struct { 298 } 299 300 func (*UnimplementedDiscoveryServer) Describe(context.Context, *Void) (*DescribeResponse, error) { 301 return nil, status.Errorf(codes.Unimplemented, "method Describe not implemented") 302 } 303 304 func RegisterDiscoveryServer(s prpc.Registrar, srv DiscoveryServer) { 305 s.RegisterService(&_Discovery_serviceDesc, srv) 306 } 307 308 func _Discovery_Describe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 309 in := new(Void) 310 if err := dec(in); err != nil { 311 return nil, err 312 } 313 if interceptor == nil { 314 return srv.(DiscoveryServer).Describe(ctx, in) 315 } 316 info := &grpc.UnaryServerInfo{ 317 Server: srv, 318 FullMethod: "/discovery.Discovery/Describe", 319 } 320 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 321 return srv.(DiscoveryServer).Describe(ctx, req.(*Void)) 322 } 323 return interceptor(ctx, in, info, handler) 324 } 325 326 var _Discovery_serviceDesc = grpc.ServiceDesc{ 327 ServiceName: "discovery.Discovery", 328 HandlerType: (*DiscoveryServer)(nil), 329 Methods: []grpc.MethodDesc{ 330 { 331 MethodName: "Describe", 332 Handler: _Discovery_Describe_Handler, 333 }, 334 }, 335 Streams: []grpc.StreamDesc{}, 336 Metadata: "go.chromium.org/luci/grpc/discovery/service.proto", 337 }