proto: split pbservice into multiple files

There are many types in this package, splitting them into node, service, healthcheck helps show the
relationship between these types.
This commit is contained in:
Daniel Nephin 2020-09-18 14:02:46 -04:00
parent 225a91ae3c
commit f7f9879dab
13 changed files with 10031 additions and 9481 deletions

View File

@ -0,0 +1,48 @@
// Code generated by protoc-gen-go-binary. DO NOT EDIT.
// source: proto/pbservice/healthcheck.proto
package pbservice
import (
"github.com/golang/protobuf/proto"
)
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *HealthCheck) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *HealthCheck) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *HeaderValue) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *HeaderValue) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *HealthCheckDefinition) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *HealthCheckDefinition) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *CheckType) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *CheckType) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,144 @@
syntax = "proto3";
package pbservice;
option go_package = "github.com/hashicorp/consul/proto/pbservice";
import "google/protobuf/duration.proto";
import "proto/pbcommon/common.proto";
import "proto/pbcommon/common_oss.proto";
// This fake import path is replaced by the build script with a versioned path
import "gogoproto/gogo.proto";
option (gogoproto.goproto_unkeyed_all) = false;
option (gogoproto.goproto_unrecognized_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.goproto_sizecache_all) = false;
// 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;
string CheckID = 2 [(gogoproto.casttype) = "github.com/hashicorp/consul/types.CheckID"];
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
HealthCheckDefinition Definition = 10 [(gogoproto.nullable) = false];
// mog: func-to=RaftIndexToStructs func-from=NewRaftIndexFromStructs
common.RaftIndex RaftIndex = 11 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
// mog: func-to=EnterpriseMetaToStructs func-from=NewEnterpriseMetaFromStructs
common.EnterpriseMeta EnterpriseMeta = 13 [(gogoproto.nullable) = false];
}
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;
bool TLSSkipVerify = 2;
// mog: func-to=MapHeadersToStructs func-from=NewMapHeadersFromStructs
map<string, HeaderValue> Header = 3 [(gogoproto.nullable) = false];
string Method = 4;
string Body = 18;
string TCP = 5;
google.protobuf.Duration Interval = 6
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
// mog: func-to=uint func-from=uint32
uint32 OutputMaxSize = 9;
google.protobuf.Duration Timeout = 7
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
google.protobuf.Duration DeregisterCriticalServiceAfter = 8
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
repeated string ScriptArgs = 10;
string DockerContainerID = 11;
string Shell = 12;
string GRPC = 13;
bool GRPCUseTLS = 14;
string AliasNode = 15;
string AliasService = 16;
google.protobuf.Duration TTL = 17
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
}
// CheckType is used to create either the CheckMonitor or the CheckTTL.
// The following types are supported: Script, HTTP, TCP, Docker, TTL, GRPC,
// Alias. Script,
// HTTP, Docker, TCP and GRPC all require Interval. Only one of the types may
// to be provided: TTL or Script/Interval or HTTP/Interval or TCP/Interval or
// Docker/Interval or GRPC/Interval or AliasService.
//
// mog annotation:
//
// target=github.com/hashicorp/consul/agent/structs.CheckType
// output=healthcheck.gen.go
// name=Structs
message CheckType {
string CheckID = 1 [(gogoproto.casttype) = "github.com/hashicorp/consul/types.CheckID"];
string Name = 2;
string Status = 3;
string Notes = 4;
repeated string ScriptArgs = 5;
string HTTP = 6;
// mog: func-to=MapHeadersToStructs func-from=NewMapHeadersFromStructs
map<string, HeaderValue> Header = 20 [(gogoproto.nullable) = false];
string Method = 7;
string Body = 26;
string TCP = 8;
google.protobuf.Duration Interval = 9
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
string AliasNode = 10;
string AliasService = 11;
string DockerContainerID = 12;
string Shell = 13;
string GRPC = 14;
bool GRPCUseTLS = 15;
bool TLSSkipVerify = 16;
google.protobuf.Duration Timeout = 17
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
google.protobuf.Duration TTL = 18
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
// mog: func-to=int func-from=int32
int32 SuccessBeforePassing = 21;
// mog: func-to=int func-from=int32
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.
google.protobuf.Duration DeregisterCriticalServiceAfter = 19
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
// mog: func-to=int func-from=int32
int32 OutputMaxSize = 25;
}

View File

@ -0,0 +1,38 @@
// Code generated by protoc-gen-go-binary. DO NOT EDIT.
// source: proto/pbservice/node.proto
package pbservice
import (
"github.com/golang/protobuf/proto"
)
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *CheckServiceNode) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *CheckServiceNode) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *Node) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *Node) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *NodeService) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *NodeService) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}

2205
proto/pbservice/node.pb.go Normal file

File diff suppressed because it is too large Load Diff

115
proto/pbservice/node.proto Normal file
View File

@ -0,0 +1,115 @@
syntax = "proto3";
package pbservice;
option go_package = "github.com/hashicorp/consul/proto/pbservice";
import "proto/pbcommon/common.proto";
import "proto/pbcommon/common_oss.proto";
import "proto/pbservice/healthcheck.proto";
import "proto/pbservice/service.proto";
// This fake import path is replaced by the build script with a versioned path
import "gogoproto/gogo.proto";
option (gogoproto.goproto_unkeyed_all) = false;
option (gogoproto.goproto_unrecognized_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.goproto_sizecache_all) = false;
// CheckServiceNode is used to provide the node, its service
// definition, as well as a HealthCheck that is associated.
message CheckServiceNode {
Node Node = 1;
NodeService Service = 2;
repeated HealthCheck Checks = 3;
}
// Node contains information about a node.
//
// mog annotation:
//
// target=github.com/hashicorp/consul/agent/structs.Node
// output=node.gen.go
// name=Structs
message Node {
string ID = 1 [(gogoproto.casttype) = "github.com/hashicorp/consul/types.NodeID"];
string Node = 2;
string Address = 3;
string Datacenter = 4;
map<string, string> TaggedAddresses = 5;
map<string, string> Meta = 6;
// mog: func-to=RaftIndexToStructs func-from=NewRaftIndexFromStructs
common.RaftIndex RaftIndex = 7 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
}
// NodeService is a service provided by a node
//
// mog annotation:
//
// target=github.com/hashicorp/consul/agent/structs.NodeService
// output=node.gen.go
// name=Structs
message NodeService {
// Kind is the kind of service this is. Different kinds of services may
// have differing validation, DNS behavior, etc. An empty kind will default
// to the Default kind. See ServiceKind for the full list of kinds.
string Kind = 1 [(gogoproto.casttype) = "github.com/hashicorp/consul/agent/structs.ServiceKind"];
string ID = 2;
string Service = 3;
repeated string Tags = 4;
string Address = 5;
// mog: func-to=MapStringServiceAddressToStructs func-from=NewMapStringServiceAddressFromStructs
map<string, ServiceAddress> TaggedAddresses = 15 [(gogoproto.nullable) = false];
map<string, string> Meta = 6;
// mog: func-to=int func-from=int32
int32 Port = 7;
// mog: func-to=WeightsPtrToStructs func-from=NewWeightsPtrFromStructs
Weights Weights = 8;
bool EnableTagOverride = 9;
// Proxy is the configuration set for Kind = connect-proxy. It is mandatory in
// that case and an error to be set for any other kind. This config is part of
// a proxy service definition and is distinct from but shares some fields with
// the Connect.Proxy which configures a managed proxy as part of the actual
// service's definition. This duplication is ugly but seemed better than the
// alternative which was to re-use the same struct fields for both cases even
// though the semantics are different and the non-shred fields make no sense
// in the other case. ProxyConfig may be a more natural name here, but it's
// confusing for the UX because one of the fields in ConnectProxyConfig is
// also called just "Config"
ConnectProxyConfig Proxy = 11 [(gogoproto.nullable) = false];
// Connect are the Connect settings for a service. This is purposely NOT
// a pointer so that we never have to nil-check this.
ServiceConnect Connect = 12 [(gogoproto.nullable) = false];
// LocallyRegisteredAsSidecar is private as it is only used by a local agent
// state to track if the service was registered from a nested sidecar_service
// block. We need to track that so we can know whether we need to deregister
// it automatically too if it's removed from the service definition or if the
// parent service is deregistered. Relying only on ID would cause us to
// deregister regular services if they happen to be registered using the same
// ID scheme as our sidecars do by default. We could use meta but that gets
// unpleasant because we can't use the consul- prefix from an agent (reserved
// for use internally but in practice that means within the state store or in
// responses only), and it leaks the detail publicly which people might rely
// on which is a bit unpleasant for something that is meant to be config-file
// syntax sugar. Note this is not translated to ServiceNode and friends and
// may not be set on a NodeService that isn't the one the agent registered and
// keeps in it's local state. We never want this rendered in JSON as it's
// internal only. Right now our agent endpoints return api structs which don't
// include it but this is a safety net incase we change that or there is
// somewhere this is used in API output.
bool LocallyRegisteredAsSidecar = 13;
// mog: func-to=EnterpriseMetaToStructs func-from=NewEnterpriseMetaFromStructs
common.EnterpriseMeta EnterpriseMeta = 16 [(gogoproto.nullable) = false];
// mog: func-to=RaftIndexToStructs func-from=NewRaftIndexFromStructs
common.RaftIndex RaftIndex = 14 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
}

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-binary. DO NOT EDIT.
// source: proto/pbservice/structs.proto
// source: proto/pbservice/service.proto
package pbservice
@ -7,86 +7,6 @@ import (
"github.com/golang/protobuf/proto"
)
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *Node) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *Node) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *ServiceDefinition) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *ServiceDefinition) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *ServiceAddress) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *ServiceAddress) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *HealthCheck) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *HealthCheck) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *HeaderValue) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *HeaderValue) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *HealthCheckDefinition) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *HealthCheckDefinition) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *CheckServiceNode) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *CheckServiceNode) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *NodeService) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *NodeService) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *ConnectProxyConfig) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
@ -117,16 +37,6 @@ func (msg *ServiceConnect) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *Weights) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *Weights) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *ExposeConfig) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
@ -147,16 +57,6 @@ func (msg *ExposePath) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *CheckType) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *CheckType) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *MeshGatewayConfig) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
@ -166,3 +66,33 @@ func (msg *MeshGatewayConfig) MarshalBinary() ([]byte, error) {
func (msg *MeshGatewayConfig) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *ServiceDefinition) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *ServiceDefinition) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *ServiceAddress) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *ServiceAddress) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *Weights) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *Weights) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,256 @@
syntax = "proto3";
package pbservice;
option go_package = "github.com/hashicorp/consul/proto/pbservice";
import "google/protobuf/struct.proto";
import "proto/pbcommon/common_oss.proto";
import "proto/pbservice/healthcheck.proto";
// This fake import path is replaced by the build script with a versioned path
import "gogoproto/gogo.proto";
option (gogoproto.goproto_unkeyed_all) = false;
option (gogoproto.goproto_unrecognized_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.goproto_sizecache_all) = false;
// ConnectProxyConfig describes the configuration needed for any proxy managed
// or unmanaged. It describes a single logical service's listener and optionally
// upstreams and sidecar-related config for a single instance. To describe a
// centralized proxy that routed traffic for multiple services, a different one
// of these would be needed for each, sharing the same LogicalProxyID.
//
// mog annotation:
//
// target=github.com/hashicorp/consul/agent/structs.ConnectProxyConfig
// output=service.gen.go
// name=Structs
message ConnectProxyConfig {
// DestinationServiceName is required and is the name of the service to accept
// traffic for.
string DestinationServiceName = 1;
// DestinationServiceID is optional and should only be specified for
// "side-car" style proxies where the proxy is in front of just a single
// instance of the service. It should be set to the service ID of the instance
// being represented which must be registered to the same agent. It's valid to
// provide a service ID that does not yet exist to avoid timing issues when
// bootstrapping a service with a proxy.
string DestinationServiceID = 2;
// LocalServiceAddress is the address of the local service instance. It is
// optional and should only be specified for "side-car" style proxies. It will
// default to 127.0.0.1 if the proxy is a "side-car" (DestinationServiceID is
// set) but otherwise will be ignored.
string LocalServiceAddress = 3;
// LocalServicePort is the port of the local service instance. It is optional
// and should only be specified for "side-car" style proxies. It will default
// to the registered port for the instance if the proxy is a "side-car"
// (DestinationServiceID is set) but otherwise will be ignored.
// mog: func-to=int func-from=int32
int32 LocalServicePort = 4;
// Config is the arbitrary configuration data provided with the proxy
// registration.
// mog: func-to=MapStringInterfaceToStructs func-from=NewMapStringInterfaceFromStructs
google.protobuf.Struct Config = 5 [(gogoproto.nullable) = true];
// Upstreams describes any upstream dependencies the proxy instance should
// setup.
// mog: func-to=UpstreamsToStructs func-from=NewUpstreamsFromStructs
repeated Upstream Upstreams = 6 [(gogoproto.nullable) = false];
// MeshGateway defines the mesh gateway configuration for this upstream
MeshGatewayConfig MeshGateway = 7 [(gogoproto.nullable) = false];
// Expose defines whether checks or paths are exposed through the proxy
ExposeConfig Expose = 8 [(gogoproto.nullable) = false];
}
// Upstream represents a single upstream dependency for a service or proxy. It
// describes the mechanism used to discover instances to communicate with (the
// Target) as well as any potential client configuration that may be useful such
// as load balancer options, timeouts etc.
//
// mog annotation:
//
// target=github.com/hashicorp/consul/agent/structs.Upstream
// output=service.gen.go
// name=Structs
// ignore-fields=IngressHosts
message Upstream {
// Destination fields are the required ones for determining what this upstream
// points to. Depending on DestinationType some other fields below might
// further restrict the set of instances allowable.
//
// DestinationType would be better as an int constant but even with custom
// JSON marshallers it causes havoc with all the mapstructure mangling we do
// on service definitions in various places.
string DestinationType = 1;
string DestinationNamespace = 2;
string DestinationName = 3;
// Datacenter that the service discovery request should be run against. Note
// for prepared queries, the actual results might be from a different
// datacenter.
string Datacenter = 4;
// LocalBindAddress is the ip address a side-car proxy should listen on for
// traffic destined for this upstream service. Default if empty is 127.0.0.1.
string LocalBindAddress = 5;
// LocalBindPort is the ip address a side-car proxy should listen on for
// traffic destined for this upstream service. Required.
// mog: func-to=int func-from=int32
int32 LocalBindPort = 6;
// Config is an opaque config that is specific to the proxy process being run.
// It can be used to pass arbitrary configuration for this specific upstream
// to the proxy.
// mog: func-to=MapStringInterfaceToStructs func-from=NewMapStringInterfaceFromStructs
google.protobuf.Struct Config = 7 [(gogoproto.nullable) = true];
// MeshGateway is the configuration for mesh gateway usage of this upstream
MeshGatewayConfig MeshGateway = 8 [(gogoproto.nullable) = false];
}
// ServiceConnect are the shared Connect settings between all service
// definitions from the agent to the state store.
// mog annotation:
//
// target=github.com/hashicorp/consul/agent/structs.ServiceConnect
// output=service.gen.go
// name=Structs
message ServiceConnect {
// Native is true when this service can natively understand Connect.
bool Native = 1;
// SidecarService is a nested Service Definition to register at the same time.
// It's purely a convenience mechanism to allow specifying a sidecar service
// along with the application service definition. It's nested nature allows
// all of the fields to be defaulted which can reduce the amount of
// boilerplate needed to register a sidecar service separately, but the end
// result is identical to just making a second service registration via any
// other means.
// mog: func-to=ServiceDefinitionPtrToStructs func-from=NewServiceDefinitionPtrFromStructs
ServiceDefinition SidecarService = 3;
}
// ExposeConfig describes HTTP paths to expose through Envoy outside of Connect.
// Users can expose individual paths and/or all HTTP/GRPC paths for checks.
//
// mog annotation:
//
// target=github.com/hashicorp/consul/agent/structs.ExposeConfig
// output=service.gen.go
// name=Structs
message ExposeConfig {
// Checks defines whether paths associated with Consul checks will be exposed.
// This flag triggers exposing all HTTP and GRPC check paths registered for the service.
bool Checks = 1;
// Paths is the list of paths exposed through the proxy.
// mog: func-to=ExposePathSliceToStructs func-from=NewExposePathSliceFromStructs
repeated ExposePath Paths = 2 [(gogoproto.nullable) = false];
}
// mog annotation:
//
// target=github.com/hashicorp/consul/agent/structs.ExposePath
// output=service.gen.go
// name=Structs
message ExposePath {
// ListenerPort defines the port of the proxy's listener for exposed paths.
// mog: func-to=int func-from=int32
int32 ListenerPort = 1;
// ExposePath is the path to expose through the proxy, ie. "/metrics."
string Path = 2;
// LocalPathPort is the port that the service is listening on for the given path.
// mog: func-to=int func-from=int32
int32 LocalPathPort = 3;
// Protocol describes the upstream's service protocol.
// Valid values are "http" and "http2", defaults to "http"
string Protocol = 4;
// ParsedFromCheck is set if this path was parsed from a registered check
bool ParsedFromCheck = 5;
}
// mog annotation:
//
// target=github.com/hashicorp/consul/agent/structs.MeshGatewayConfig
// output=service.gen.go
// name=Structs
message MeshGatewayConfig {
string Mode = 1 [(gogoproto.casttype) = "github.com/hashicorp/consul/agent/structs.MeshGatewayMode"];
}
// ServiceDefinition is used to JSON decode the Service definitions. For
// documentation on specific fields see NodeService which is better documented.
//
// mog annotation:
//
// target=github.com/hashicorp/consul/agent/structs.ServiceDefinition
// output=service.gen.go
// name=Structs
message ServiceDefinition {
string Kind = 1 [(gogoproto.casttype) = "github.com/hashicorp/consul/agent/structs.ServiceKind"];
string ID = 2;
string Name = 3;
repeated string Tags = 4;
string Address = 5;
// mog: func-to=MapStringServiceAddressToStructs func-from=NewMapStringServiceAddressFromStructs
map<string, ServiceAddress> TaggedAddresses = 16 [(gogoproto.nullable) = false];
map<string, string> Meta = 6;
// mog: func-to=int func-from=int32
int32 Port = 7;
CheckType Check = 8 [(gogoproto.nullable) = false];
// mog: func-to=CheckTypesToStructs func-from=NewCheckTypesFromStructs
repeated CheckType Checks = 9;
// mog: func-to=WeightsPtrToStructs func-from=NewWeightsPtrFromStructs
Weights Weights = 10;
string Token = 11;
bool EnableTagOverride = 12;
// Proxy is the configuration set for Kind = connect-proxy. It is mandatory in
// that case and an error to be set for any other kind. This config is part of
// a proxy service definition and is distinct from but shares some fields with
// the Connect.Proxy which configures a managed proxy as part of the actual
// service's definition. This duplication is ugly but seemed better than the
// alternative which was to re-use the same struct fields for both cases even
// though the semantics are different and the non-shared fields make no sense
// in the other case. ProxyConfig may be a more natural name here, but it's
// confusing for the UX because one of the fields in ConnectProxyConfig is
// also called just "Config"
// mog: func-to=ConnectProxyConfigPtrToStructs func-from=NewConnectProxyConfigPtrFromStructs
ConnectProxyConfig Proxy = 14;
// mog: func-to=EnterpriseMetaToStructs func-from=NewEnterpriseMetaFromStructs
common.EnterpriseMeta EnterpriseMeta = 17 [(gogoproto.nullable) = false];
// mog: func-to=ServiceConnectPtrToStructs func-from=NewServiceConnectPtrFromStructs
ServiceConnect Connect = 15;
}
// Type to hold an address and port of a service
message ServiceAddress {
string Address = 1;
// mog: func-to=int func-from=int32
int32 Port = 2;
}
// Weights represent the weight used by DNS for a given status
message Weights {
// mog: func-to=int func-from=int32
int32 Passing = 1;
// mog: func-to=int func-from=int32
int32 Warning = 2;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,403 +0,0 @@
syntax = "proto3";
package pbservice;
option go_package = "github.com/hashicorp/consul/proto/pbservice";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "proto/pbcommon/common.proto";
import "proto/pbcommon/common_oss.proto";
// Go Modules now includes the version in the filepath for packages within GOPATH/pkg/mode
// Therefore unless we want to hardcode a version here like
// github.com/gogo/protobuf@v1.3.0/gogoproto/gogo.proto then the only other choice is to
// have a more relative import and pass the right import path to protoc. I don't like it
// but its necessary.
import "gogoproto/gogo.proto";
option (gogoproto.goproto_unkeyed_all) = false;
option (gogoproto.goproto_unrecognized_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.goproto_sizecache_all) = false;
// Used to return information about a node
message Node {
string ID = 1
[(gogoproto.casttype) = "github.com/hashicorp/consul/types.NodeID"];
string Node = 2;
string Address = 3;
string Datacenter = 4;
map<string, string> TaggedAddresses = 5;
map<string, string> Meta = 6;
common.RaftIndex RaftIndex = 7
[(gogoproto.embed) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "bexpr:\"-\""];
}
// ServiceDefinition is used to JSON decode the Service definitions. For
// documentation on specific fields see NodeService which is better documented.
message ServiceDefinition {
string Kind = 1 [(gogoproto.casttype) =
"github.com/hashicorp/consul/agent/structs.ServiceKind"];
string ID = 2;
string Name = 3;
repeated string Tags = 4;
string Address = 5;
map<string, ServiceAddress> TaggedAddresses = 16;
map<string, string> Meta = 6;
int32 Port = 7 [(gogoproto.casttype) = "int"];
CheckType Check = 8 [(gogoproto.nullable) = false];
repeated CheckType Checks = 9;
Weights Weights = 10;
string Token = 11;
bool EnableTagOverride = 12;
// Proxy is the configuration set for Kind = connect-proxy. It is mandatory in
// that case and an error to be set for any other kind. This config is part of
// a proxy service definition and is distinct from but shares some fields with
// the Connect.Proxy which configures a managed proxy as part of the actual
// service's definition. This duplication is ugly but seemed better than the
// alternative which was to re-use the same struct fields for both cases even
// though the semantics are different and the non-shared fields make no sense
// in the other case. ProxyConfig may be a more natural name here, but it's
// confusing for the UX because one of the fields in ConnectProxyConfig is
// also called just "Config"
ConnectProxyConfig Proxy = 14;
common.EnterpriseMeta EnterpriseMeta = 17;
ServiceConnect Connect = 15;
}
// Type to hold an address and port of a service
message ServiceAddress {
string Address = 1;
int32 Port = 2 [(gogoproto.casttype) = "int"];
}
// HealthCheck represents a single check on a given node
message HealthCheck {
string Node = 1;
string CheckID = 2
[(gogoproto.casttype) =
"github.com/hashicorp/consul/types.CheckID"]; // Unique per-node ID
string Name = 3; // Check name
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
HealthCheckDefinition Definition = 10
[(gogoproto.nullable) = false, (gogoproto.moretags) = "bexpr:\"-\""];
common.EnterpriseMeta EnterpriseMeta = 13;
common.RaftIndex RaftIndex = 11
[(gogoproto.embed) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "bexpr:\"-\""];
}
message HeaderValue {
repeated string Value = 1;
}
message HealthCheckDefinition {
string HTTP = 1 [(gogoproto.jsontag) = ",omitempty"];
bool TLSSkipVerify = 2 [(gogoproto.jsontag) = ",omitempty"];
map<string, HeaderValue> Header = 3 [(gogoproto.nullable) = false];
string Method = 4 [(gogoproto.jsontag) = ",omitempty"];
string Body = 18 [(gogoproto.jsontag) = ",omitempty"];
string TCP = 5 [(gogoproto.jsontag) = ",omitempty"];
google.protobuf.Duration Interval = 6
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
uint32 OutputMaxSize = 9;
google.protobuf.Duration Timeout = 7
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
google.protobuf.Duration DeregisterCriticalServiceAfter = 8
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
repeated string ScriptArgs = 10;
string DockerContainerID = 11;
string Shell = 12;
string GRPC = 13;
bool GRPCUseTLS = 14;
string AliasNode = 15;
string AliasService = 16;
google.protobuf.Duration TTL = 17
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
}
// CheckServiceNode is used to provide the node, its service
// definition, as well as a HealthCheck that is associated.
message CheckServiceNode {
Node Node = 1;
NodeService Service = 2;
repeated HealthCheck Checks = 3;
}
// NodeService is a service provided by a node
message NodeService {
// Kind is the kind of service this is. Different kinds of services may
// have differing validation, DNS behavior, etc. An empty kind will default
// to the Default kind. See ServiceKind for the full list of kinds.
string Kind = 1 [
(gogoproto.casttype) =
"github.com/hashicorp/consul/agent/structs.ServiceKind",
(gogoproto.jsontag) = ",omitempty"
];
string ID = 2;
string Service = 3;
repeated string Tags = 4;
string Address = 5;
map<string, ServiceAddress> TaggedAddresses = 15;
map<string, string> Meta = 6;
int32 Port = 7 [(gogoproto.casttype) = "int"];
Weights Weights = 8;
bool EnableTagOverride = 9;
// Proxy is the configuration set for Kind = connect-proxy. It is mandatory in
// that case and an error to be set for any other kind. This config is part of
// a proxy service definition and is distinct from but shares some fields with
// the Connect.Proxy which configures a managed proxy as part of the actual
// service's definition. This duplication is ugly but seemed better than the
// alternative which was to re-use the same struct fields for both cases even
// though the semantics are different and the non-shred fields make no sense
// in the other case. ProxyConfig may be a more natural name here, but it's
// confusing for the UX because one of the fields in ConnectProxyConfig is
// also called just "Config"
ConnectProxyConfig Proxy = 11 [(gogoproto.nullable) = false];
// Connect are the Connect settings for a service. This is purposely NOT
// a pointer so that we never have to nil-check this.
ServiceConnect Connect = 12 [(gogoproto.nullable) = false];
// LocallyRegisteredAsSidecar is private as it is only used by a local agent
// state to track if the service was registered from a nested sidecar_service
// block. We need to track that so we can know whether we need to deregister
// it automatically too if it's removed from the service definition or if the
// parent service is deregistered. Relying only on ID would cause us to
// deregister regular services if they happen to be registered using the same
// ID scheme as our sidecars do by default. We could use meta but that gets
// unpleasant because we can't use the consul- prefix from an agent (reserved
// for use internally but in practice that means within the state store or in
// responses only), and it leaks the detail publicly which people might rely
// on which is a bit unpleasant for something that is meant to be config-file
// syntax sugar. Note this is not translated to ServiceNode and friends and
// may not be set on a NodeService that isn't the one the agent registered and
// keeps in it's local state. We never want this rendered in JSON as it's
// internal only. Right now our agent endpoints return api structs which don't
// include it but this is a safety net incase we change that or there is
// somewhere this is used in API output.
bool LocallyRegisteredAsSidecar = 13 [(gogoproto.moretags) = "bexpr:\"-\""];
common.EnterpriseMeta EnterpriseMeta = 16;
common.RaftIndex RaftIndex = 14
[(gogoproto.embed) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "bexpr:\"-\""];
}
// ConnectProxyConfig describes the configuration needed for any proxy managed
// or unmanaged. It describes a single logical service's listener and optionally
// upstreams and sidecar-related config for a single instance. To describe a
// centralized proxy that routed traffic for multiple services, a different one
// of these would be needed for each, sharing the same LogicalProxyID.
message ConnectProxyConfig {
// DestinationServiceName is required and is the name of the service to accept
// traffic for.
string DestinationServiceName = 1;
// DestinationServiceID is optional and should only be specified for
// "side-car" style proxies where the proxy is in front of just a single
// instance of the service. It should be set to the service ID of the instance
// being represented which must be registered to the same agent. It's valid to
// provide a service ID that does not yet exist to avoid timing issues when
// bootstrapping a service with a proxy.
string DestinationServiceID = 2;
// LocalServiceAddress is the address of the local service instance. It is
// optional and should only be specified for "side-car" style proxies. It will
// default to 127.0.0.1 if the proxy is a "side-car" (DestinationServiceID is
// set) but otherwise will be ignored.
string LocalServiceAddress = 3;
// LocalServicePort is the port of the local service instance. It is optional
// and should only be specified for "side-car" style proxies. It will default
// to the registered port for the instance if the proxy is a "side-car"
// (DestinationServiceID is set) but otherwise will be ignored.
int32 LocalServicePort = 4 [(gogoproto.casttype) = "int"];
// Config is the arbitrary configuration data provided with the proxy
// registration.
google.protobuf.Struct Config = 5
[(gogoproto.nullable) = true, (gogoproto.moretags) = "bexpr:\"-\""];
// Upstreams describes any upstream dependencies the proxy instance should
// setup.
repeated Upstream Upstreams = 6 [(gogoproto.nullable) = false];
// MeshGateway defines the mesh gateway configuration for this upstream
MeshGatewayConfig MeshGateway = 7;
// Expose defines whether checks or paths are exposed through the proxy
ExposeConfig Expose = 8;
}
// Upstream represents a single upstream dependency for a service or proxy. It
// describes the mechanism used to discover instances to communicate with (the
// Target) as well as any potential client configuration that may be useful such
// as load balancer options, timeouts etc.
message Upstream {
// Destination fields are the required ones for determining what this upstream
// points to. Depending on DestinationType some other fields below might
// further restrict the set of instances allowable.
//
// DestinationType would be better as an int constant but even with custom
// JSON marshallers it causes havoc with all the mapstructure mangling we do
// on service definitions in various places.
string DestinationType = 1;
string DestinationNamespace = 2;
string DestinationName = 3;
// Datacenter that the service discovery request should be run against. Note
// for prepared queries, the actual results might be from a different
// datacenter.
string Datacenter = 4;
// LocalBindAddress is the ip address a side-car proxy should listen on for
// traffic destined for this upstream service. Default if empty is 127.0.0.1.
string LocalBindAddress = 5;
// LocalBindPort is the ip address a side-car proxy should listen on for
// traffic
// destined for this upstream service. Required.
int32 LocalBindPort = 6 [(gogoproto.casttype) = "int"];
// Config is an opaque config that is specific to the proxy process being run.
// It can be used to pass arbitrary configuration for this specific upstream
// to the proxy.
google.protobuf.Struct Config = 7
[(gogoproto.nullable) = true, (gogoproto.moretags) = "bexpr:\"-\""];
// MeshGateway is the configuration for mesh gateway usage of this upstream
MeshGatewayConfig MeshGateway = 8;
}
// ServiceConnect are the shared Connect settings between all service
// definitions from the agent to the state store.
message ServiceConnect {
// Native is true when this service can natively understand Connect.
bool Native = 1;
// SidecarService is a nested Service Definition to register at the same time.
// It's purely a convenience mechanism to allow specifying a sidecar service
// along with the application service definition. It's nested nature allows
// all of the fields to be defaulted which can reduce the amount of
// boilerplate needed to register a sidecar service separately, but the end
// result is identical to just making a second service registration via any
// other means.
ServiceDefinition SidecarService = 3 [(gogoproto.moretags) = "bexpr:\"-\""];
}
// Weights represent the weight used by DNS for a given status
message Weights {
int32 Passing = 1 [(gogoproto.casttype) = "int"];
int32 Warning = 2 [(gogoproto.casttype) = "int"];
}
// ExposeConfig describes HTTP paths to expose through Envoy outside of Connect.
// Users can expose individual paths and/or all HTTP/GRPC paths for checks.
message ExposeConfig {
// Checks defines whether paths associated with Consul checks will be exposed.
// This flag triggers exposing all HTTP and GRPC check paths registered for the service.
bool Checks = 1;
// Paths is the list of paths exposed through the proxy.
repeated ExposePath Paths = 2;
}
message ExposePath {
// ListenerPort defines the port of the proxy's listener for exposed paths.
int32 ListenerPort = 1;
// ExposePath is the path to expose through the proxy, ie. "/metrics."
string Path = 2;
// LocalPathPort is the port that the service is listening on for the given path.
int32 LocalPathPort = 3;
// Protocol describes the upstream's service protocol.
// Valid values are "http" and "http2", defaults to "http"
string Protocol = 4;
// ParsedFromCheck is set if this path was parsed from a registered check
bool ParsedFromCheck = 5;
}
// CheckType is used to create either the CheckMonitor or the CheckTTL.
// The following types are supported: Script, HTTP, TCP, Docker, TTL, GRPC,
// Alias. Script,
// HTTP, Docker, TCP and GRPC all require Interval. Only one of the types may
// to be provided: TTL or Script/Interval or HTTP/Interval or TCP/Interval or
// Docker/Interval or GRPC/Interval or AliasService.
message CheckType {
// fields already embedded in CheckDefinition
// Note: CheckType.CheckID == CheckDefinition.ID
string CheckID = 1 [
(gogoproto.casttype) = "github.com/hashicorp/consul/types.CheckID",
(gogoproto.jsontag) = ""
];
string Name = 2;
string Status = 3;
string Notes = 4;
// fields copied to CheckDefinition
// Update CheckDefinition when adding fields here
repeated string ScriptArgs = 5;
string HTTP = 6;
map<string, HeaderValue> Header = 20
[(gogoproto.nullable) = false];
string Method = 7;
string Body = 26;
string TCP = 8;
google.protobuf.Duration Interval = 9
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
string AliasNode = 10;
string AliasService = 11;
string DockerContainerID = 12;
string Shell = 13;
string GRPC = 14;
bool GRPCUseTLS = 15;
bool TLSSkipVerify = 16;
google.protobuf.Duration Timeout = 17
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
google.protobuf.Duration TTL = 18
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
int32 SuccessBeforePassing = 21;
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.
google.protobuf.Duration DeregisterCriticalServiceAfter = 19
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
int32 OutputMaxSize = 25;
}
message MeshGatewayConfig {
string Mode = 1 [
(gogoproto.casttype) =
"github.com/hashicorp/consul/agent/structs.MeshGatewayMode" ];
}

View File

@ -546,40 +546,40 @@ func init() {
func init() { proto.RegisterFile("proto/pbsubscribe/subscribe.proto", fileDescriptor_ab3eb8c810e315fb) }
var fileDescriptor_ab3eb8c810e315fb = []byte{
// 525 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0xf6, 0x26, 0x4d, 0xd2, 0x4c, 0x68, 0x65, 0x96, 0x20, 0xac, 0x56, 0x58, 0x21, 0x42, 0x95,
0xa9, 0x44, 0x5c, 0x05, 0x09, 0x6e, 0x20, 0x92, 0x06, 0x82, 0x90, 0x08, 0x72, 0xe8, 0x01, 0x6e,
0x1b, 0x67, 0x88, 0xad, 0xa4, 0xbb, 0x8b, 0xbd, 0x29, 0xe4, 0xce, 0x43, 0xf4, 0x65, 0xb8, 0x73,
0xe4, 0x11, 0x50, 0x78, 0x11, 0x94, 0xb5, 0xeb, 0x3a, 0x49, 0x6f, 0xbd, 0x79, 0xbe, 0x9f, 0x9d,
0x4f, 0x33, 0x1e, 0x78, 0x24, 0x23, 0xa1, 0x84, 0x2b, 0x47, 0xf1, 0x7c, 0x14, 0xfb, 0x51, 0x38,
0x42, 0x37, 0xfb, 0x6a, 0x69, 0x8e, 0x56, 0x33, 0xe0, 0xe0, 0x61, 0xa6, 0xc6, 0xe8, 0x22, 0xf4,
0xd1, 0x8d, 0x55, 0x34, 0xf7, 0x55, 0x9c, 0x28, 0x9b, 0x97, 0x04, 0xcc, 0xe1, 0x95, 0xd8, 0xc3,
0x6f, 0x73, 0x8c, 0x15, 0x3d, 0x82, 0xd2, 0x27, 0x21, 0x43, 0xdf, 0x22, 0x0d, 0xe2, 0xec, 0xb7,
0xcd, 0xd6, 0xf5, 0xfb, 0x1a, 0xf7, 0x12, 0x9a, 0x9a, 0x50, 0x7c, 0x8f, 0x0b, 0xab, 0xd0, 0x20,
0x4e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 0xc4, 0x64, 0x20, 0xbd, 0xc2, 0x40, 0xd2,
0xb7, 0x60, 0x76, 0x03, 0xf4, 0xa7, 0xe9, 0x0b, 0x1f, 0xc4, 0x18, 0xf5, 0x42, 0x6a, 0xed, 0xc3,
0x56, 0xf6, 0x13, 0xb6, 0x36, 0x25, 0xde, 0x96, 0xe9, 0xf8, 0x75, 0xba, 0x74, 0x5a, 0x83, 0xca,
0x19, 0x9f, 0x72, 0xf1, 0x9d, 0x9b, 0x06, 0xbd, 0xbb, 0x31, 0x27, 0x93, 0x50, 0x0b, 0xea, 0x6b,
0x50, 0x57, 0x70, 0x8e, 0xbe, 0x32, 0x0b, 0xc7, 0x4f, 0xa0, 0x9a, 0x85, 0xa3, 0x77, 0x60, 0xd7,
0xc3, 0x49, 0x18, 0x2b, 0x8c, 0x4c, 0x83, 0xee, 0x03, 0x9c, 0x62, 0x74, 0x55, 0x93, 0xf6, 0x67,
0x78, 0x30, 0x54, 0x4c, 0x61, 0x37, 0x60, 0x7c, 0x82, 0xe9, 0x45, 0x48, 0x15, 0x0a, 0x4e, 0x5f,
0x42, 0x35, 0xbb, 0x10, 0x7a, 0x98, 0x5f, 0xc8, 0xc6, 0xdd, 0x1c, 0x6c, 0xcd, 0xb4, 0x69, 0x9c,
0x90, 0xce, 0xab, 0xdf, 0x4b, 0x9b, 0xfc, 0x59, 0xda, 0xe4, 0xef, 0xd2, 0x26, 0x97, 0xff, 0x6c,
0xe3, 0xcb, 0xd3, 0x49, 0xa8, 0x82, 0xf9, 0xa8, 0xe5, 0x8b, 0x73, 0x37, 0x60, 0x71, 0x10, 0xfa,
0x22, 0x92, 0xae, 0x2f, 0x78, 0x3c, 0x9f, 0xb9, 0x5b, 0xd7, 0x3d, 0x2a, 0x6b, 0xe8, 0xd9, 0xff,
0x00, 0x00, 0x00, 0xff, 0xff, 0x40, 0x75, 0x46, 0x39, 0xf9, 0x03, 0x00, 0x00,
// 521 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0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5b, 0xe2, 0xed, 0x98, 0x4e, 0x5e, 0xa5, 0x4b, 0xa7, 0x35, 0xa8, 0x9c, 0xf3, 0x29, 0x17,
0xdf, 0xb8, 0x69, 0xd0, 0xbb, 0x5b, 0x73, 0x32, 0x09, 0xb5, 0xa0, 0xbe, 0x01, 0xf5, 0x04, 0xe7,
0xe8, 0x2b, 0xb3, 0x70, 0xf2, 0x18, 0xaa, 0x59, 0x38, 0x7a, 0x07, 0xf6, 0x3d, 0x9c, 0x44, 0x89,
0xc2, 0xd8, 0x34, 0xe8, 0x21, 0xc0, 0x19, 0xc6, 0xd7, 0x35, 0xe9, 0x7c, 0x82, 0x07, 0x23, 0xc5,
0x14, 0xf6, 0x42, 0xc6, 0x27, 0x98, 0x5e, 0x84, 0x54, 0x91, 0xe0, 0xf4, 0x05, 0x54, 0xb3, 0x0b,
0xa1, 0x47, 0xf9, 0x85, 0x6c, 0xdd, 0x4d, 0x63, 0x67, 0xa6, 0x2d, 0xe3, 0x94, 0x74, 0x5f, 0xfe,
0x5a, 0xda, 0xe4, 0xf7, 0xd2, 0x26, 0x7f, 0x96, 0x36, 0xb9, 0xfa, 0x6b, 0x1b, 0x9f, 0x9f, 0x4c,
0x22, 0x15, 0xce, 0xc7, 0x6d, 0x5f, 0x5c, 0xb8, 0x21, 0x4b, 0xc2, 0xc8, 0x17, 0xb1, 0x74, 0x7d,
0xc1, 0x93, 0xf9, 0xcc, 0xdd, 0x39, 0xed, 0x71, 0x59, 0x43, 0x4f, 0xff, 0x05, 0x00, 0x00, 0xff,
0xff, 0x7d, 0xf7, 0xca, 0x01, 0xf6, 0x03, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.

View File

@ -7,7 +7,7 @@ package subscribe;
option go_package = "github.com/hashicorp/consul/proto/pbsubscribe";
import "proto/pbservice/structs.proto";
import "proto/pbservice/node.proto";
// StateChangeSubscription service allows consumers to subscribe to topics of
// state change events. Events are streamed as they happen.