2020-09-18 18:02:46 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package pbservice;
|
|
|
|
|
|
|
|
option go_package = "github.com/hashicorp/consul/proto/pbservice";
|
|
|
|
|
|
|
|
import "google/protobuf/duration.proto";
|
2022-03-23 16:10:03 +00:00
|
|
|
import "proto/pbcommon/common.proto";
|
2020-09-18 18:02:46 +00:00
|
|
|
|
|
|
|
// HealthCheck represents a single check on a given node
|
|
|
|
//
|
|
|
|
// mog annotation:
|
|
|
|
//
|
|
|
|
// target=github.com/hashicorp/consul/agent/structs.HealthCheck
|
|
|
|
// output=healthcheck.gen.go
|
|
|
|
// name=Structs
|
|
|
|
message HealthCheck {
|
|
|
|
string Node = 1;
|
2022-03-23 16:10:03 +00:00
|
|
|
// mog: func-to=CheckIDType func-from=string
|
|
|
|
string CheckID = 2;
|
2020-09-18 18:02:46 +00:00
|
|
|
string Name = 3;
|
|
|
|
string Status = 4; // The current check status
|
|
|
|
string Notes = 5; // Additional notes with the status
|
|
|
|
string Output = 6; // Holds output of script runs
|
|
|
|
string ServiceID = 7; // optional associated service
|
|
|
|
string ServiceName = 8; // optional service name
|
|
|
|
repeated string ServiceTags = 9; // optional service tags
|
|
|
|
string Type = 12; // Check type: http/ttl/tcp/etc
|
|
|
|
|
2022-03-23 16:10:03 +00:00
|
|
|
HealthCheckDefinition Definition = 10;
|
2020-09-18 18:02:46 +00:00
|
|
|
|
|
|
|
// mog: func-to=RaftIndexToStructs func-from=NewRaftIndexFromStructs
|
2022-03-23 16:10:03 +00:00
|
|
|
common.RaftIndex RaftIndex = 11;
|
2020-09-18 18:02:46 +00:00
|
|
|
|
|
|
|
// mog: func-to=EnterpriseMetaToStructs func-from=NewEnterpriseMetaFromStructs
|
2022-03-23 16:10:03 +00:00
|
|
|
common.EnterpriseMeta EnterpriseMeta = 13;
|
2021-05-12 20:51:39 +00:00
|
|
|
|
|
|
|
// mog: func-to=int func-from=int32
|
|
|
|
int32 ExposedPort = 14;
|
2021-08-03 22:26:49 +00:00
|
|
|
|
|
|
|
string Interval = 15;
|
|
|
|
string Timeout = 16;
|
2020-09-18 18:02:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message HeaderValue {
|
|
|
|
repeated string Value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// HealthCheckDefinition of a single HealthCheck.
|
|
|
|
//
|
|
|
|
// mog annotation:
|
|
|
|
//
|
|
|
|
// target=github.com/hashicorp/consul/agent/structs.HealthCheckDefinition
|
|
|
|
// output=healthcheck.gen.go
|
|
|
|
// name=Structs
|
|
|
|
message HealthCheckDefinition {
|
|
|
|
string HTTP = 1;
|
2021-02-25 06:35:34 +00:00
|
|
|
string TLSServerName = 19;
|
2020-09-18 18:02:46 +00:00
|
|
|
bool TLSSkipVerify = 2;
|
|
|
|
|
|
|
|
// mog: func-to=MapHeadersToStructs func-from=NewMapHeadersFromStructs
|
2022-03-23 16:10:03 +00:00
|
|
|
map<string, HeaderValue> Header = 3;
|
2020-09-18 18:02:46 +00:00
|
|
|
string Method = 4;
|
|
|
|
string Body = 18;
|
2022-04-01 21:31:15 +00:00
|
|
|
bool DisableRedirects = 22;
|
2020-09-18 18:02:46 +00:00
|
|
|
string TCP = 5;
|
2022-03-23 16:10:03 +00:00
|
|
|
// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
|
|
|
|
google.protobuf.Duration Interval = 6;
|
2020-09-18 18:02:46 +00:00
|
|
|
|
|
|
|
// mog: func-to=uint func-from=uint32
|
|
|
|
uint32 OutputMaxSize = 9;
|
2022-03-23 16:10:03 +00:00
|
|
|
// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
|
|
|
|
google.protobuf.Duration Timeout = 7;
|
|
|
|
// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
|
|
|
|
google.protobuf.Duration DeregisterCriticalServiceAfter = 8;
|
2020-09-18 18:02:46 +00:00
|
|
|
repeated string ScriptArgs = 10;
|
|
|
|
string DockerContainerID = 11;
|
|
|
|
string Shell = 12;
|
2021-04-09 19:12:10 +00:00
|
|
|
string H2PING = 20;
|
2021-10-05 01:36:18 +00:00
|
|
|
bool H2PingUseTLS = 21;
|
2020-09-18 18:02:46 +00:00
|
|
|
string GRPC = 13;
|
|
|
|
bool GRPCUseTLS = 14;
|
|
|
|
string AliasNode = 15;
|
|
|
|
string AliasService = 16;
|
2022-03-23 16:10:03 +00:00
|
|
|
// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
|
|
|
|
google.protobuf.Duration TTL = 17;
|
2020-09-18 18:02:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// CheckType is used to create either the CheckMonitor or the CheckTTL.
|
|
|
|
// The following types are supported: Script, HTTP, TCP, Docker, TTL, GRPC,
|
2021-04-09 19:12:10 +00:00
|
|
|
// Alias. Script, H2PING,
|
|
|
|
// HTTP, Docker, TCP, H2PING and GRPC all require Interval. Only one of the types may
|
2020-09-18 18:02:46 +00:00
|
|
|
// to be provided: TTL or Script/Interval or HTTP/Interval or TCP/Interval or
|
2021-04-09 19:12:10 +00:00
|
|
|
// Docker/Interval or GRPC/Interval or H2PING/Interval or AliasService.
|
2020-09-18 18:02:46 +00:00
|
|
|
//
|
|
|
|
// mog annotation:
|
|
|
|
//
|
|
|
|
// target=github.com/hashicorp/consul/agent/structs.CheckType
|
|
|
|
// output=healthcheck.gen.go
|
|
|
|
// name=Structs
|
|
|
|
message CheckType {
|
2022-03-23 16:10:03 +00:00
|
|
|
// mog: func-to=CheckIDType func-from=string
|
|
|
|
string CheckID = 1;
|
2020-09-18 18:02:46 +00:00
|
|
|
string Name = 2;
|
|
|
|
string Status = 3;
|
|
|
|
string Notes = 4;
|
|
|
|
|
|
|
|
repeated string ScriptArgs = 5;
|
|
|
|
string HTTP = 6;
|
|
|
|
// mog: func-to=MapHeadersToStructs func-from=NewMapHeadersFromStructs
|
2022-03-23 16:10:03 +00:00
|
|
|
map<string, HeaderValue> Header = 20;
|
2020-09-18 18:02:46 +00:00
|
|
|
string Method = 7;
|
|
|
|
string Body = 26;
|
2022-04-01 21:31:15 +00:00
|
|
|
bool DisableRedirects = 31;
|
2020-09-18 18:02:46 +00:00
|
|
|
string TCP = 8;
|
2022-03-23 16:10:03 +00:00
|
|
|
// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
|
|
|
|
google.protobuf.Duration Interval = 9;
|
2020-09-18 18:02:46 +00:00
|
|
|
|
|
|
|
string AliasNode = 10;
|
|
|
|
string AliasService = 11;
|
|
|
|
string DockerContainerID = 12;
|
|
|
|
string Shell = 13;
|
2021-04-09 19:12:10 +00:00
|
|
|
string H2PING = 28;
|
2021-10-05 01:36:18 +00:00
|
|
|
bool H2PingUseTLS = 30;
|
2020-09-18 18:02:46 +00:00
|
|
|
string GRPC = 14;
|
|
|
|
bool GRPCUseTLS = 15;
|
2021-02-25 06:35:34 +00:00
|
|
|
string TLSServerName = 27;
|
2020-09-18 18:02:46 +00:00
|
|
|
bool TLSSkipVerify = 16;
|
2022-03-23 16:10:03 +00:00
|
|
|
// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
|
|
|
|
google.protobuf.Duration Timeout = 17;
|
|
|
|
// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
|
|
|
|
google.protobuf.Duration TTL = 18;
|
2020-09-18 18:02:46 +00:00
|
|
|
|
|
|
|
// mog: func-to=int func-from=int32
|
|
|
|
int32 SuccessBeforePassing = 21;
|
|
|
|
// mog: func-to=int func-from=int32
|
2021-09-14 16:47:52 +00:00
|
|
|
int32 FailuresBeforeWarning = 29;
|
|
|
|
// mog: func-to=int func-from=int32
|
2020-09-18 18:02:46 +00:00
|
|
|
int32 FailuresBeforeCritical = 22;
|
|
|
|
|
|
|
|
// Definition fields used when exposing checks through a proxy
|
|
|
|
string ProxyHTTP = 23;
|
|
|
|
string ProxyGRPC = 24;
|
|
|
|
|
|
|
|
// DeregisterCriticalServiceAfter, if >0, will cause the associated
|
|
|
|
// service, if any, to be deregistered if this check is critical for
|
|
|
|
// longer than this duration.
|
2022-03-23 16:10:03 +00:00
|
|
|
// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
|
|
|
|
google.protobuf.Duration DeregisterCriticalServiceAfter = 19;
|
2020-09-18 18:02:46 +00:00
|
|
|
|
|
|
|
// mog: func-to=int func-from=int32
|
|
|
|
int32 OutputMaxSize = 25;
|
2021-04-09 19:12:10 +00:00
|
|
|
}
|