google.golang.org/grpc@v1.74.2/health/grpc_health_v1/health.pb.go (about) 1 // Copyright 2015 The gRPC Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // The canonical version of this proto can be found at 16 // https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto 17 18 // Code generated by protoc-gen-go. DO NOT EDIT. 19 // versions: 20 // protoc-gen-go v1.36.6 21 // protoc v5.27.1 22 // source: grpc/health/v1/health.proto 23 24 package grpc_health_v1 25 26 import ( 27 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 28 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 29 reflect "reflect" 30 sync "sync" 31 unsafe "unsafe" 32 ) 33 34 const ( 35 // Verify that this generated code is sufficiently up-to-date. 36 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 37 // Verify that runtime/protoimpl is sufficiently up-to-date. 38 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 39 ) 40 41 type HealthCheckResponse_ServingStatus int32 42 43 const ( 44 HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0 45 HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1 46 HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2 47 HealthCheckResponse_SERVICE_UNKNOWN HealthCheckResponse_ServingStatus = 3 // Used only by the Watch method. 48 ) 49 50 // Enum value maps for HealthCheckResponse_ServingStatus. 51 var ( 52 HealthCheckResponse_ServingStatus_name = map[int32]string{ 53 0: "UNKNOWN", 54 1: "SERVING", 55 2: "NOT_SERVING", 56 3: "SERVICE_UNKNOWN", 57 } 58 HealthCheckResponse_ServingStatus_value = map[string]int32{ 59 "UNKNOWN": 0, 60 "SERVING": 1, 61 "NOT_SERVING": 2, 62 "SERVICE_UNKNOWN": 3, 63 } 64 ) 65 66 func (x HealthCheckResponse_ServingStatus) Enum() *HealthCheckResponse_ServingStatus { 67 p := new(HealthCheckResponse_ServingStatus) 68 *p = x 69 return p 70 } 71 72 func (x HealthCheckResponse_ServingStatus) String() string { 73 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 74 } 75 76 func (HealthCheckResponse_ServingStatus) Descriptor() protoreflect.EnumDescriptor { 77 return file_grpc_health_v1_health_proto_enumTypes[0].Descriptor() 78 } 79 80 func (HealthCheckResponse_ServingStatus) Type() protoreflect.EnumType { 81 return &file_grpc_health_v1_health_proto_enumTypes[0] 82 } 83 84 func (x HealthCheckResponse_ServingStatus) Number() protoreflect.EnumNumber { 85 return protoreflect.EnumNumber(x) 86 } 87 88 // Deprecated: Use HealthCheckResponse_ServingStatus.Descriptor instead. 89 func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int) { 90 return file_grpc_health_v1_health_proto_rawDescGZIP(), []int{1, 0} 91 } 92 93 type HealthCheckRequest struct { 94 state protoimpl.MessageState `protogen:"open.v1"` 95 Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` 96 unknownFields protoimpl.UnknownFields 97 sizeCache protoimpl.SizeCache 98 } 99 100 func (x *HealthCheckRequest) Reset() { 101 *x = HealthCheckRequest{} 102 mi := &file_grpc_health_v1_health_proto_msgTypes[0] 103 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 104 ms.StoreMessageInfo(mi) 105 } 106 107 func (x *HealthCheckRequest) String() string { 108 return protoimpl.X.MessageStringOf(x) 109 } 110 111 func (*HealthCheckRequest) ProtoMessage() {} 112 113 func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message { 114 mi := &file_grpc_health_v1_health_proto_msgTypes[0] 115 if x != nil { 116 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 117 if ms.LoadMessageInfo() == nil { 118 ms.StoreMessageInfo(mi) 119 } 120 return ms 121 } 122 return mi.MessageOf(x) 123 } 124 125 // Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead. 126 func (*HealthCheckRequest) Descriptor() ([]byte, []int) { 127 return file_grpc_health_v1_health_proto_rawDescGZIP(), []int{0} 128 } 129 130 func (x *HealthCheckRequest) GetService() string { 131 if x != nil { 132 return x.Service 133 } 134 return "" 135 } 136 137 type HealthCheckResponse struct { 138 state protoimpl.MessageState `protogen:"open.v1"` 139 Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=grpc.health.v1.HealthCheckResponse_ServingStatus" json:"status,omitempty"` 140 unknownFields protoimpl.UnknownFields 141 sizeCache protoimpl.SizeCache 142 } 143 144 func (x *HealthCheckResponse) Reset() { 145 *x = HealthCheckResponse{} 146 mi := &file_grpc_health_v1_health_proto_msgTypes[1] 147 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 148 ms.StoreMessageInfo(mi) 149 } 150 151 func (x *HealthCheckResponse) String() string { 152 return protoimpl.X.MessageStringOf(x) 153 } 154 155 func (*HealthCheckResponse) ProtoMessage() {} 156 157 func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message { 158 mi := &file_grpc_health_v1_health_proto_msgTypes[1] 159 if x != nil { 160 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 161 if ms.LoadMessageInfo() == nil { 162 ms.StoreMessageInfo(mi) 163 } 164 return ms 165 } 166 return mi.MessageOf(x) 167 } 168 169 // Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead. 170 func (*HealthCheckResponse) Descriptor() ([]byte, []int) { 171 return file_grpc_health_v1_health_proto_rawDescGZIP(), []int{1} 172 } 173 174 func (x *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus { 175 if x != nil { 176 return x.Status 177 } 178 return HealthCheckResponse_UNKNOWN 179 } 180 181 type HealthListRequest struct { 182 state protoimpl.MessageState `protogen:"open.v1"` 183 unknownFields protoimpl.UnknownFields 184 sizeCache protoimpl.SizeCache 185 } 186 187 func (x *HealthListRequest) Reset() { 188 *x = HealthListRequest{} 189 mi := &file_grpc_health_v1_health_proto_msgTypes[2] 190 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 191 ms.StoreMessageInfo(mi) 192 } 193 194 func (x *HealthListRequest) String() string { 195 return protoimpl.X.MessageStringOf(x) 196 } 197 198 func (*HealthListRequest) ProtoMessage() {} 199 200 func (x *HealthListRequest) ProtoReflect() protoreflect.Message { 201 mi := &file_grpc_health_v1_health_proto_msgTypes[2] 202 if x != nil { 203 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 204 if ms.LoadMessageInfo() == nil { 205 ms.StoreMessageInfo(mi) 206 } 207 return ms 208 } 209 return mi.MessageOf(x) 210 } 211 212 // Deprecated: Use HealthListRequest.ProtoReflect.Descriptor instead. 213 func (*HealthListRequest) Descriptor() ([]byte, []int) { 214 return file_grpc_health_v1_health_proto_rawDescGZIP(), []int{2} 215 } 216 217 type HealthListResponse struct { 218 state protoimpl.MessageState `protogen:"open.v1"` 219 // statuses contains all the services and their respective status. 220 Statuses map[string]*HealthCheckResponse `protobuf:"bytes,1,rep,name=statuses,proto3" json:"statuses,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 221 unknownFields protoimpl.UnknownFields 222 sizeCache protoimpl.SizeCache 223 } 224 225 func (x *HealthListResponse) Reset() { 226 *x = HealthListResponse{} 227 mi := &file_grpc_health_v1_health_proto_msgTypes[3] 228 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 229 ms.StoreMessageInfo(mi) 230 } 231 232 func (x *HealthListResponse) String() string { 233 return protoimpl.X.MessageStringOf(x) 234 } 235 236 func (*HealthListResponse) ProtoMessage() {} 237 238 func (x *HealthListResponse) ProtoReflect() protoreflect.Message { 239 mi := &file_grpc_health_v1_health_proto_msgTypes[3] 240 if x != nil { 241 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 242 if ms.LoadMessageInfo() == nil { 243 ms.StoreMessageInfo(mi) 244 } 245 return ms 246 } 247 return mi.MessageOf(x) 248 } 249 250 // Deprecated: Use HealthListResponse.ProtoReflect.Descriptor instead. 251 func (*HealthListResponse) Descriptor() ([]byte, []int) { 252 return file_grpc_health_v1_health_proto_rawDescGZIP(), []int{3} 253 } 254 255 func (x *HealthListResponse) GetStatuses() map[string]*HealthCheckResponse { 256 if x != nil { 257 return x.Statuses 258 } 259 return nil 260 } 261 262 var File_grpc_health_v1_health_proto protoreflect.FileDescriptor 263 264 const file_grpc_health_v1_health_proto_rawDesc = "" + 265 "\n" + 266 "\x1bgrpc/health/v1/health.proto\x12\x0egrpc.health.v1\".\n" + 267 "\x12HealthCheckRequest\x12\x18\n" + 268 "\aservice\x18\x01 \x01(\tR\aservice\"\xb1\x01\n" + 269 "\x13HealthCheckResponse\x12I\n" + 270 "\x06status\x18\x01 \x01(\x0e21.grpc.health.v1.HealthCheckResponse.ServingStatusR\x06status\"O\n" + 271 "\rServingStatus\x12\v\n" + 272 "\aUNKNOWN\x10\x00\x12\v\n" + 273 "\aSERVING\x10\x01\x12\x0f\n" + 274 "\vNOT_SERVING\x10\x02\x12\x13\n" + 275 "\x0fSERVICE_UNKNOWN\x10\x03\"\x13\n" + 276 "\x11HealthListRequest\"\xc4\x01\n" + 277 "\x12HealthListResponse\x12L\n" + 278 "\bstatuses\x18\x01 \x03(\v20.grpc.health.v1.HealthListResponse.StatusesEntryR\bstatuses\x1a`\n" + 279 "\rStatusesEntry\x12\x10\n" + 280 "\x03key\x18\x01 \x01(\tR\x03key\x129\n" + 281 "\x05value\x18\x02 \x01(\v2#.grpc.health.v1.HealthCheckResponseR\x05value:\x028\x012\xfd\x01\n" + 282 "\x06Health\x12P\n" + 283 "\x05Check\x12\".grpc.health.v1.HealthCheckRequest\x1a#.grpc.health.v1.HealthCheckResponse\x12M\n" + 284 "\x04List\x12!.grpc.health.v1.HealthListRequest\x1a\".grpc.health.v1.HealthListResponse\x12R\n" + 285 "\x05Watch\x12\".grpc.health.v1.HealthCheckRequest\x1a#.grpc.health.v1.HealthCheckResponse0\x01Bp\n" + 286 "\x11io.grpc.health.v1B\vHealthProtoP\x01Z,google.golang.org/grpc/health/grpc_health_v1\xa2\x02\fGrpcHealthV1\xaa\x02\x0eGrpc.Health.V1b\x06proto3" 287 288 var ( 289 file_grpc_health_v1_health_proto_rawDescOnce sync.Once 290 file_grpc_health_v1_health_proto_rawDescData []byte 291 ) 292 293 func file_grpc_health_v1_health_proto_rawDescGZIP() []byte { 294 file_grpc_health_v1_health_proto_rawDescOnce.Do(func() { 295 file_grpc_health_v1_health_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_grpc_health_v1_health_proto_rawDesc), len(file_grpc_health_v1_health_proto_rawDesc))) 296 }) 297 return file_grpc_health_v1_health_proto_rawDescData 298 } 299 300 var file_grpc_health_v1_health_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 301 var file_grpc_health_v1_health_proto_msgTypes = make([]protoimpl.MessageInfo, 5) 302 var file_grpc_health_v1_health_proto_goTypes = []any{ 303 (HealthCheckResponse_ServingStatus)(0), // 0: grpc.health.v1.HealthCheckResponse.ServingStatus 304 (*HealthCheckRequest)(nil), // 1: grpc.health.v1.HealthCheckRequest 305 (*HealthCheckResponse)(nil), // 2: grpc.health.v1.HealthCheckResponse 306 (*HealthListRequest)(nil), // 3: grpc.health.v1.HealthListRequest 307 (*HealthListResponse)(nil), // 4: grpc.health.v1.HealthListResponse 308 nil, // 5: grpc.health.v1.HealthListResponse.StatusesEntry 309 } 310 var file_grpc_health_v1_health_proto_depIdxs = []int32{ 311 0, // 0: grpc.health.v1.HealthCheckResponse.status:type_name -> grpc.health.v1.HealthCheckResponse.ServingStatus 312 5, // 1: grpc.health.v1.HealthListResponse.statuses:type_name -> grpc.health.v1.HealthListResponse.StatusesEntry 313 2, // 2: grpc.health.v1.HealthListResponse.StatusesEntry.value:type_name -> grpc.health.v1.HealthCheckResponse 314 1, // 3: grpc.health.v1.Health.Check:input_type -> grpc.health.v1.HealthCheckRequest 315 3, // 4: grpc.health.v1.Health.List:input_type -> grpc.health.v1.HealthListRequest 316 1, // 5: grpc.health.v1.Health.Watch:input_type -> grpc.health.v1.HealthCheckRequest 317 2, // 6: grpc.health.v1.Health.Check:output_type -> grpc.health.v1.HealthCheckResponse 318 4, // 7: grpc.health.v1.Health.List:output_type -> grpc.health.v1.HealthListResponse 319 2, // 8: grpc.health.v1.Health.Watch:output_type -> grpc.health.v1.HealthCheckResponse 320 6, // [6:9] is the sub-list for method output_type 321 3, // [3:6] is the sub-list for method input_type 322 3, // [3:3] is the sub-list for extension type_name 323 3, // [3:3] is the sub-list for extension extendee 324 0, // [0:3] is the sub-list for field type_name 325 } 326 327 func init() { file_grpc_health_v1_health_proto_init() } 328 func file_grpc_health_v1_health_proto_init() { 329 if File_grpc_health_v1_health_proto != nil { 330 return 331 } 332 type x struct{} 333 out := protoimpl.TypeBuilder{ 334 File: protoimpl.DescBuilder{ 335 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 336 RawDescriptor: unsafe.Slice(unsafe.StringData(file_grpc_health_v1_health_proto_rawDesc), len(file_grpc_health_v1_health_proto_rawDesc)), 337 NumEnums: 1, 338 NumMessages: 5, 339 NumExtensions: 0, 340 NumServices: 1, 341 }, 342 GoTypes: file_grpc_health_v1_health_proto_goTypes, 343 DependencyIndexes: file_grpc_health_v1_health_proto_depIdxs, 344 EnumInfos: file_grpc_health_v1_health_proto_enumTypes, 345 MessageInfos: file_grpc_health_v1_health_proto_msgTypes, 346 }.Build() 347 File_grpc_health_v1_health_proto = out.File 348 file_grpc_health_v1_health_proto_goTypes = nil 349 file_grpc_health_v1_health_proto_depIdxs = nil 350 }