|
1 | 1 | // Original file: proto/health/v1/health.proto
|
2 | 2 |
|
| 3 | +import type * as grpc from '@grpc/grpc-js' |
3 | 4 | import type { MethodDefinition } from '@grpc/proto-loader'
|
4 | 5 | import type { HealthCheckRequest as _grpc_health_v1_HealthCheckRequest, HealthCheckRequest__Output as _grpc_health_v1_HealthCheckRequest__Output } from '../../../grpc/health/v1/HealthCheckRequest';
|
5 | 6 | import type { HealthCheckResponse as _grpc_health_v1_HealthCheckResponse, HealthCheckResponse__Output as _grpc_health_v1_HealthCheckResponse__Output } from '../../../grpc/health/v1/HealthCheckResponse';
|
6 | 7 |
|
7 |
| -export interface HealthDefinition { |
| 8 | +/** |
| 9 | + * Health is gRPC's mechanism for checking whether a server is able to handle |
| 10 | + * RPCs. Its semantics are documented in |
| 11 | + * https://github.com/grpc/grpc/blob/master/doc/health-checking.md. |
| 12 | + */ |
| 13 | +export interface HealthClient extends grpc.ServiceClient { |
| 14 | + /** |
| 15 | + * Check gets the health of the specified service. If the requested service |
| 16 | + * is unknown, the call will fail with status NOT_FOUND. If the caller does |
| 17 | + * not specify a service name, the server should respond with its overall |
| 18 | + * health status. |
| 19 | + * |
| 20 | + * Clients should set a deadline when calling Check, and can declare the |
| 21 | + * server unhealthy if they do not receive a timely response. |
| 22 | + * |
| 23 | + * Check implementations should be idempotent and side effect free. |
| 24 | + */ |
| 25 | + Check(argument: _grpc_health_v1_HealthCheckRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_health_v1_HealthCheckResponse__Output>): grpc.ClientUnaryCall; |
| 26 | + Check(argument: _grpc_health_v1_HealthCheckRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_health_v1_HealthCheckResponse__Output>): grpc.ClientUnaryCall; |
| 27 | + Check(argument: _grpc_health_v1_HealthCheckRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_health_v1_HealthCheckResponse__Output>): grpc.ClientUnaryCall; |
| 28 | + Check(argument: _grpc_health_v1_HealthCheckRequest, callback: grpc.requestCallback<_grpc_health_v1_HealthCheckResponse__Output>): grpc.ClientUnaryCall; |
| 29 | + /** |
| 30 | + * Check gets the health of the specified service. If the requested service |
| 31 | + * is unknown, the call will fail with status NOT_FOUND. If the caller does |
| 32 | + * not specify a service name, the server should respond with its overall |
| 33 | + * health status. |
| 34 | + * |
| 35 | + * Clients should set a deadline when calling Check, and can declare the |
| 36 | + * server unhealthy if they do not receive a timely response. |
| 37 | + * |
| 38 | + * Check implementations should be idempotent and side effect free. |
| 39 | + */ |
| 40 | + check(argument: _grpc_health_v1_HealthCheckRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_health_v1_HealthCheckResponse__Output>): grpc.ClientUnaryCall; |
| 41 | + check(argument: _grpc_health_v1_HealthCheckRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_health_v1_HealthCheckResponse__Output>): grpc.ClientUnaryCall; |
| 42 | + check(argument: _grpc_health_v1_HealthCheckRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_health_v1_HealthCheckResponse__Output>): grpc.ClientUnaryCall; |
| 43 | + check(argument: _grpc_health_v1_HealthCheckRequest, callback: grpc.requestCallback<_grpc_health_v1_HealthCheckResponse__Output>): grpc.ClientUnaryCall; |
| 44 | + |
| 45 | + /** |
| 46 | + * Performs a watch for the serving status of the requested service. |
| 47 | + * The server will immediately send back a message indicating the current |
| 48 | + * serving status. It will then subsequently send a new message whenever |
| 49 | + * the service's serving status changes. |
| 50 | + * |
| 51 | + * If the requested service is unknown when the call is received, the |
| 52 | + * server will send a message setting the serving status to |
| 53 | + * SERVICE_UNKNOWN but will *not* terminate the call. If at some |
| 54 | + * future point, the serving status of the service becomes known, the |
| 55 | + * server will send a new message with the service's serving status. |
| 56 | + * |
| 57 | + * If the call terminates with status UNIMPLEMENTED, then clients |
| 58 | + * should assume this method is not supported and should not retry the |
| 59 | + * call. If the call terminates with any other status (including OK), |
| 60 | + * clients should retry the call with appropriate exponential backoff. |
| 61 | + */ |
| 62 | + Watch(argument: _grpc_health_v1_HealthCheckRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_grpc_health_v1_HealthCheckResponse__Output>; |
| 63 | + Watch(argument: _grpc_health_v1_HealthCheckRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<_grpc_health_v1_HealthCheckResponse__Output>; |
| 64 | + /** |
| 65 | + * Performs a watch for the serving status of the requested service. |
| 66 | + * The server will immediately send back a message indicating the current |
| 67 | + * serving status. It will then subsequently send a new message whenever |
| 68 | + * the service's serving status changes. |
| 69 | + * |
| 70 | + * If the requested service is unknown when the call is received, the |
| 71 | + * server will send a message setting the serving status to |
| 72 | + * SERVICE_UNKNOWN but will *not* terminate the call. If at some |
| 73 | + * future point, the serving status of the service becomes known, the |
| 74 | + * server will send a new message with the service's serving status. |
| 75 | + * |
| 76 | + * If the call terminates with status UNIMPLEMENTED, then clients |
| 77 | + * should assume this method is not supported and should not retry the |
| 78 | + * call. If the call terminates with any other status (including OK), |
| 79 | + * clients should retry the call with appropriate exponential backoff. |
| 80 | + */ |
| 81 | + watch(argument: _grpc_health_v1_HealthCheckRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_grpc_health_v1_HealthCheckResponse__Output>; |
| 82 | + watch(argument: _grpc_health_v1_HealthCheckRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<_grpc_health_v1_HealthCheckResponse__Output>; |
| 83 | + |
| 84 | +} |
| 85 | + |
| 86 | +/** |
| 87 | + * Health is gRPC's mechanism for checking whether a server is able to handle |
| 88 | + * RPCs. Its semantics are documented in |
| 89 | + * https://github.com/grpc/grpc/blob/master/doc/health-checking.md. |
| 90 | + */ |
| 91 | +export interface HealthHandlers extends grpc.UntypedServiceImplementation { |
| 92 | + /** |
| 93 | + * Check gets the health of the specified service. If the requested service |
| 94 | + * is unknown, the call will fail with status NOT_FOUND. If the caller does |
| 95 | + * not specify a service name, the server should respond with its overall |
| 96 | + * health status. |
| 97 | + * |
| 98 | + * Clients should set a deadline when calling Check, and can declare the |
| 99 | + * server unhealthy if they do not receive a timely response. |
| 100 | + * |
| 101 | + * Check implementations should be idempotent and side effect free. |
| 102 | + */ |
| 103 | + Check: grpc.handleUnaryCall<_grpc_health_v1_HealthCheckRequest__Output, _grpc_health_v1_HealthCheckResponse>; |
| 104 | + |
| 105 | + /** |
| 106 | + * Performs a watch for the serving status of the requested service. |
| 107 | + * The server will immediately send back a message indicating the current |
| 108 | + * serving status. It will then subsequently send a new message whenever |
| 109 | + * the service's serving status changes. |
| 110 | + * |
| 111 | + * If the requested service is unknown when the call is received, the |
| 112 | + * server will send a message setting the serving status to |
| 113 | + * SERVICE_UNKNOWN but will *not* terminate the call. If at some |
| 114 | + * future point, the serving status of the service becomes known, the |
| 115 | + * server will send a new message with the service's serving status. |
| 116 | + * |
| 117 | + * If the call terminates with status UNIMPLEMENTED, then clients |
| 118 | + * should assume this method is not supported and should not retry the |
| 119 | + * call. If the call terminates with any other status (including OK), |
| 120 | + * clients should retry the call with appropriate exponential backoff. |
| 121 | + */ |
| 122 | + Watch: grpc.handleServerStreamingCall<_grpc_health_v1_HealthCheckRequest__Output, _grpc_health_v1_HealthCheckResponse>; |
| 123 | + |
| 124 | +} |
| 125 | + |
| 126 | +export interface HealthDefinition extends grpc.ServiceDefinition { |
8 | 127 | Check: MethodDefinition<_grpc_health_v1_HealthCheckRequest, _grpc_health_v1_HealthCheckResponse, _grpc_health_v1_HealthCheckRequest__Output, _grpc_health_v1_HealthCheckResponse__Output>
|
9 | 128 | Watch: MethodDefinition<_grpc_health_v1_HealthCheckRequest, _grpc_health_v1_HealthCheckResponse, _grpc_health_v1_HealthCheckRequest__Output, _grpc_health_v1_HealthCheckResponse__Output>
|
10 | 129 | }
|
0 commit comments