health.proto 878 B

12345678910111213141516171819202122232425262728293031323334
  1. syntax = "proto3";
  2. // See: https://github.com/grpc/grpc-go/blob/master/health/grpc_health_v1/health.proto
  3. //
  4. // We use the same health check service proto description defined in the gRPC documentation,
  5. // including the authorization check. This requires our own implementation of the health
  6. // package located in `manager/health`.
  7. //
  8. // For more infos, refer to:
  9. // https://github.com/grpc/grpc/blob/master/doc/health-checking.md
  10. package docker.swarmkit.v1;
  11. import "gogoproto/gogo.proto";
  12. import "plugin/plugin.proto";
  13. service Health {
  14. rpc Check(HealthCheckRequest) returns (HealthCheckResponse) {
  15. option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-manager" };
  16. };
  17. }
  18. message HealthCheckRequest {
  19. string service = 1;
  20. }
  21. message HealthCheckResponse {
  22. enum ServingStatus {
  23. UNKNOWN = 0;
  24. SERVING = 1;
  25. NOT_SERVING = 2;
  26. }
  27. ServingStatus status = 1;
  28. }