consul/proto-public/pbcatalog/v1alpha1/health.proto

82 lines
1.8 KiB
Protocol Buffer
Raw Normal View History

// Copyright (c) HashiCorp, Inc.
[COMPLIANCE] License changes (#18443) * Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Updating the license from MPL to Business Source License Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at <Blog URL>, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl. * add missing license headers * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2023-08-11 13:12:13 +00:00
// SPDX-License-Identifier: BUSL-1.1
syntax = "proto3";
package hashicorp.consul.catalog.v1alpha1;
import "google/protobuf/duration.proto";
import "pbcatalog/v1alpha1/selector.proto";
// This resource will belong to a workload or a node and will have an ownership relationship.
message HealthStatus {
// Type is the type of this health check, such as http, tcp, or kubernetes-readiness
string type = 1;
// Health is the status. This maps to existing health check statuses.
Health status = 2;
// Description is the description for this status.
string description = 3;
// Output is the output from running the check that resulted in this status
string output = 4;
}
enum Health {
// buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
HEALTH_ANY = 0;
HEALTH_PASSING = 1;
HEALTH_WARNING = 2;
HEALTH_CRITICAL = 3;
HEALTH_MAINTENANCE = 4;
}
message HealthChecks {
WorkloadSelector workloads = 1;
repeated HealthCheck health_checks = 2;
}
message HealthCheck {
string name = 1;
oneof definition {
HTTPCheck http = 2;
TCPCheck tcp = 3;
UDPCheck udp = 4;
GRPCCheck grpc = 5;
OSServiceCheck os_service = 6;
}
google.protobuf.Duration interval = 7;
google.protobuf.Duration timeout = 8;
google.protobuf.Duration deregister_critical_after = 9;
}
message HTTPCheck {
string url = 1;
map<string, string> header = 2;
string method = 3;
string body = 4;
bool disable_redirects = 5;
CheckTLSConfig tls = 6;
}
message TCPCheck {
string address = 1;
}
message UDPCheck {
string address = 1;
}
message GRPCCheck {
string address = 1;
CheckTLSConfig tls = 2;
}
message OSServiceCheck {
string address = 1;
}
message CheckTLSConfig {
string tls_server_name = 1;
bool tls_skip_verify = 2;
bool use_tls = 3;
}