1syntax = "proto3"; 2 3package pbservice; 4 5option go_package = "github.com/hashicorp/consul/proto/pbservice"; 6 7import "google/protobuf/duration.proto"; 8import "proto/pbcommon/common.proto"; 9 10// This fake import path is replaced by the build script with a versioned path 11import "gogoproto/gogo.proto"; 12 13option (gogoproto.goproto_unkeyed_all) = false; 14option (gogoproto.goproto_unrecognized_all) = false; 15option (gogoproto.goproto_getters_all) = false; 16option (gogoproto.goproto_sizecache_all) = false; 17 18// HealthCheck represents a single check on a given node 19// 20// mog annotation: 21// 22// target=github.com/hashicorp/consul/agent/structs.HealthCheck 23// output=healthcheck.gen.go 24// name=Structs 25message HealthCheck { 26 string Node = 1; 27 string CheckID = 2 [(gogoproto.casttype) = "github.com/hashicorp/consul/types.CheckID"]; 28 string Name = 3; 29 string Status = 4; // The current check status 30 string Notes = 5; // Additional notes with the status 31 string Output = 6; // Holds output of script runs 32 string ServiceID = 7; // optional associated service 33 string ServiceName = 8; // optional service name 34 repeated string ServiceTags = 9; // optional service tags 35 string Type = 12; // Check type: http/ttl/tcp/etc 36 37 HealthCheckDefinition Definition = 10 [(gogoproto.nullable) = false]; 38 39 // mog: func-to=RaftIndexToStructs func-from=NewRaftIndexFromStructs 40 common.RaftIndex RaftIndex = 11 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; 41 42 // mog: func-to=EnterpriseMetaToStructs func-from=NewEnterpriseMetaFromStructs 43 common.EnterpriseMeta EnterpriseMeta = 13 [(gogoproto.nullable) = false]; 44 45 // mog: func-to=int func-from=int32 46 int32 ExposedPort = 14; 47 48 string Interval = 15; 49 string Timeout = 16; 50} 51 52message HeaderValue { 53 repeated string Value = 1; 54} 55 56// HealthCheckDefinition of a single HealthCheck. 57// 58// mog annotation: 59// 60// target=github.com/hashicorp/consul/agent/structs.HealthCheckDefinition 61// output=healthcheck.gen.go 62// name=Structs 63message HealthCheckDefinition { 64 string HTTP = 1; 65 string TLSServerName = 19; 66 bool TLSSkipVerify = 2; 67 68 // mog: func-to=MapHeadersToStructs func-from=NewMapHeadersFromStructs 69 map<string, HeaderValue> Header = 3 [(gogoproto.nullable) = false]; 70 string Method = 4; 71 string Body = 18; 72 string TCP = 5; 73 google.protobuf.Duration Interval = 6 74 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; 75 76 // mog: func-to=uint func-from=uint32 77 uint32 OutputMaxSize = 9; 78 google.protobuf.Duration Timeout = 7 79 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; 80 google.protobuf.Duration DeregisterCriticalServiceAfter = 8 81 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; 82 repeated string ScriptArgs = 10; 83 string DockerContainerID = 11; 84 string Shell = 12; 85 string H2PING = 20; 86 string GRPC = 13; 87 bool GRPCUseTLS = 14; 88 string AliasNode = 15; 89 string AliasService = 16; 90 google.protobuf.Duration TTL = 17 91 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; 92} 93 94// CheckType is used to create either the CheckMonitor or the CheckTTL. 95// The following types are supported: Script, HTTP, TCP, Docker, TTL, GRPC, 96// Alias. Script, H2PING, 97// HTTP, Docker, TCP, H2PING and GRPC all require Interval. Only one of the types may 98// to be provided: TTL or Script/Interval or HTTP/Interval or TCP/Interval or 99// Docker/Interval or GRPC/Interval or H2PING/Interval or AliasService. 100// 101// mog annotation: 102// 103// target=github.com/hashicorp/consul/agent/structs.CheckType 104// output=healthcheck.gen.go 105// name=Structs 106message CheckType { 107 string CheckID = 1 [(gogoproto.casttype) = "github.com/hashicorp/consul/types.CheckID"]; 108 string Name = 2; 109 string Status = 3; 110 string Notes = 4; 111 112 repeated string ScriptArgs = 5; 113 string HTTP = 6; 114 // mog: func-to=MapHeadersToStructs func-from=NewMapHeadersFromStructs 115 map<string, HeaderValue> Header = 20 [(gogoproto.nullable) = false]; 116 string Method = 7; 117 string Body = 26; 118 string TCP = 8; 119 google.protobuf.Duration Interval = 9 120 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; 121 122 string AliasNode = 10; 123 string AliasService = 11; 124 string DockerContainerID = 12; 125 string Shell = 13; 126 string H2PING = 28; 127 string GRPC = 14; 128 bool GRPCUseTLS = 15; 129 string TLSServerName = 27; 130 bool TLSSkipVerify = 16; 131 google.protobuf.Duration Timeout = 17 132 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; 133 google.protobuf.Duration TTL = 18 134 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; 135 136 // mog: func-to=int func-from=int32 137 int32 SuccessBeforePassing = 21; 138 // mog: func-to=int func-from=int32 139 int32 FailuresBeforeCritical = 22; 140 141 // Definition fields used when exposing checks through a proxy 142 string ProxyHTTP = 23; 143 string ProxyGRPC = 24; 144 145 // DeregisterCriticalServiceAfter, if >0, will cause the associated 146 // service, if any, to be deregistered if this check is critical for 147 // longer than this duration. 148 google.protobuf.Duration DeregisterCriticalServiceAfter = 19 149 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; 150 151 // mog: func-to=int func-from=int32 152 int32 OutputMaxSize = 25; 153} 154