syntax = "proto3";

package load.projects.firestarter.grpc;

import "google/protobuf/timestamp.proto";

option go_package = "a.yandex-team.ru/load/projects/firestarter/grpc;healthcheck";

service HealthCheck {
  rpc CheckHealth (HealthRequest) returns (HealthCheckResult) {}
  rpc WatchHealth (HealthRequest) returns (stream HealthResponse) {}
}

message HealthCheckResult {
  enum Status {
    STATUS_UNSPECIFIED = 0;
    INITIAL = 1;
    HEALTHY = 2;
    UNHEALTHY = 3;
    DRAINING = 4;
    INACTIVE = 5;
  }

  string health_check_group_id = 1;
  string name = 2;
  string subnet_id = 3;
  string address = 4;
  Status status = 5;
  google.protobuf.Timestamp status_changed_at = 6;
}

message HealthRequest {
  string health_check_group_id = 1;
}

message HealthResponse {
  repeated HealthCheckResult health_check_result = 1;
}

