Categorygithub.com/hashicorp/consul/api
modulepackage
1.31.2
Repository: https://github.com/hashicorp/consul.git
Documentation: pkg.go.dev

# README

Consul API Client

This package provides the api package which provides programmatic access to the full Consul API.

The full documentation is available on Godoc.

Usage

Below is an example of using the Consul client. To run the example, you must first install Consul and Go.

To run the client API, create a new Go module.

go mod init consul-demo

Copy the example code into a file called main.go in the directory where the module is defined. As seen in the example, the Consul API is often imported with the alias capi.

package main

import (
	"fmt"

	capi "github.com/hashicorp/consul/api"
)

func main() {
	// Get a new client
	client, err := capi.NewClient(capi.DefaultConfig())
	if err != nil {
		panic(err)
	}

	// Get a handle to the KV API
	kv := client.KV()

	// PUT a new KV pair
	p := &capi.KVPair{Key: "REDIS_MAXCLIENTS", Value: []byte("1000")}
	_, err = kv.Put(p, nil)
	if err != nil {
		panic(err)
	}

	// Lookup the pair
	pair, _, err := kv.Get("REDIS_MAXCLIENTS", nil)
	if err != nil {
		panic(err)
	}
	fmt.Printf("KV: %v %s\n", pair.Key, pair.Value)
}

Install the Consul API dependency with go mod tidy.

In a separate terminal window, start a local Consul server.

consul agent -dev -node machine

Run the example.

go run .

You should get the following result printed to the terminal.

KV: REDIS_MAXCLIENTS 1000

After running the code, you can also view the values in the Consul UI on your local machine at http://localhost:8500/ui/dc1/kv

# Packages

No description provided by the author

# Functions

DecodeConfigEntry will decode the result of using json.Unmarshal of a config entry into a map[string]interface{}.
No description provided by the author
DefaultConfig returns a default configuration for the client.
DefaultConfigWithLogger returns a default configuration for the client.
DefaultNonPooledConfig returns a default configuration for the client which does not pool connections.
GetContentType returns the content type for a request This function isused as routing logic or middleware to determine and enforce the appropriate content type for HTTP requests.
IsRetryableError returns true for 500 errors from the Consul servers, and network connection errors.
No description provided by the author
Defines default values for the AutopilotConfiguration type, consistent with https://www.consul.io/api-docs/operator/autopilot#parameters-1.
NewClient returns a new client.
NewHttpClient returns an http client configured with the given Transport and TLS config.
No description provided by the author
ParseConsulCAConfig takes a raw config map and returns a parsed ConsulCAProviderConfig.
ParseKubernetesAuthMethodConfig takes a raw config map and returns a parsed KubernetesAuthMethodConfig.
No description provided by the author
TLSConfig is used to generate a TLSClientConfig that's useful for talking to Consul using TLS.
No description provided by the author
No description provided by the author

# Constants

ACLClientType is the client type token.
ACLManagementType is the management type token.
ACLModeDisables indicates that ACLs are disabled for this agent.
ACLModeEnabled indicates that ACLs are enabled and operating in new ACL mode (v1.4.0+ ACLs).
DEPRECATED.
ACLModeUnkown is used to indicate that the AgentMember.Tags didn't advertise an ACL mode at all.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ACLTemplatedPolicy names.
AllSegments is used to select for all segments in MembersOpts.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AutopilotUpgradeAwaitNewServers is the status when autpilot has finished transferring leadership and has demoted all the other versioned servers but wants to indicate that more target version servers are needed to replace all the existing other version servers.
AutopilotUpgradeAwaitNewVoters is the status when more servers of the target version must be added in order to start the promotion phase of the upgrade.
AutopilotUpgradeAwaitServerRemoval is the status when autopilot is waiting for the servers on non-target versions to be removed.
AutopilotUpgradeDemoting is the status when autopilot is demoting servers not on the target version.
AutopilotUpgradeDisabled is the status when automated ugprades are disabled in the autopilot configuration.
AutopilotUpgradeIdle is the status when no upgrade is in progress.
AutopilotUpgradeLeaderTransfer is the status when autopilot is transferring leadership from a server running an older version to a server using the target version.
AutopilotUpgradePromoting is the status when autopilot is promoting servers of the target version.
BindingRuleBindTypeNode binds to a node identity with given name.
BindingRuleBindTypePolicy binds to a specific policy with given name.
BindingRuleBindTypeRole binds to pre-existing roles with the given name.
BindingRuleBindTypeService binds to a service identity with the given name.
BindingRuleBindTypeTemplatedPolicy binds to a templated policy with given template name and variables.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BuiltinValidateExtension should not be exposed directly or accepted as a valid configured extension type, as it is only used indirectly via troubleshooting tools.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DefaultLockRetryTime is how long we wait after a failed lock acquisition before attempting to do the lock again.
DefaultLockSessionName is the Session Name we assign if none is provided.
DefaultLockSessionTTL is the default session TTL if no Session is provided when creating a new Lock.
DefaultLockWaitTime is how long we block for at a time to check if lock acquisition is possible.
No description provided by the author
DefaultMonitorRetryTime is how long we wait after a failed monitor check of a lock (500 response code).
DefaultSemaphoreKey is the key used within the prefix to use for coordination between all the contenders.
DefaultSemaphoreSessionName is the Session Name we assign if none is provided.
DefaultSemaphoreSessionTTL is the default session TTL if no Session is provided when creating a new Semaphore.
DefaultSemaphoreWaitTime is how long we block for at a time to check if semaphore acquisition is possible.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
This condition is true when the controller managing the Gateway is syntactically and semantically valid enough to produce some configuration in the underlying data plane.
This condition indicates that the gateway was unable to resolve conflicting specification requirements for this Listener.
This condition indicates whether the controller was able to resolve all the object references for the Gateway.
This reason is used with the "ResolvedRefs" condition when a Listener has a TLS configuration with at least one TLS CertificateRef that is invalid or does not exist.
This reason is used with the "ResolvedRefs" condition when a Listener has a JWT configuration with at least one JWTProvider that is invalid or does not exist.
This reason is used with the "Accepted" condition when the condition is True.
This reason is used with the "Accepted" condition when the gateway has multiple invalid certificates and cannot bind to any routes.
This reason is used with the "Accepted" condition when the gateway has multiple invalid JWT providers and cannot bind to any routes.
This reason is used with the "Conflicted" condition when the condition is False.
This reason is used with the "ResolvedRefs" condition when the condition is true.
This reason is used with the "Conflicted" condition when the route is in a conflicted state, such as when a TCPListener attempts to bind to two routes.
GRPCAddrEnvName defines an environment variable name which sets the gRPC address for consul connect envoy.
GRPCCAFileEnvName defines an environment variable name which sets the CA file to use for talking to Consul gRPC over TLS.
GRPCCAPathEnvName defines an environment variable name which sets the path to a directory of CA certs to use for talking to Consul gRPC over TLS.
HealthAny is special, and is used as a wild card, not as a specific state.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
HTTPAddrEnvName defines an environment variable name which sets the HTTP address if there is no -http-addr specified.
HTTPAuthEnvName defines an environment variable name which sets the HTTP authentication header.
HTTPCAFile defines an environment variable name which sets the CA file to use for talking to Consul over TLS.
HTTPCAPath defines an environment variable name which sets the path to a directory of CA certs to use for talking to Consul over TLS.
HTTPClientCert defines an environment variable name which sets the client cert file to use for talking to Consul over TLS.
HTTPClientKey defines an environment variable name which sets the client key file to use for talking to Consul over TLS.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
HTTPNamespaceEnvVar defines an environment variable name which sets the HTTP Namespace to be used by default.
HTTPPartitionEnvName defines an environment variable name which sets the HTTP Partition to be used by default.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
HTTPSSLEnvName defines an environment variable name which sets whether or not to use HTTPS.
HTTPSSLVerifyEnvName defines an environment variable name which sets whether or not to disable certificate checking.
HTTPTLSServerName defines an environment variable name which sets the server name to use as the SNI host when connecting via TLS.
HTTPTokenEnvName defines an environment variable name which sets the HTTP token.
HTTPTokenFileEnvName defines an environment variable name which sets the HTTP token file.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IntentionDefaultNamespace is the default namespace value.
No description provided by the author
No description provided by the author
IntentionSourceConsul is a service within the Consul catalog.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
LockFlagValue is a magic flag we set to indicate a key is being used for a lock.
MemberTagKeyACLMode is the key used to indicate what ACL mode the agent is operating in.
MemberTagKeyBootstrap is the key name of the tag used to indicate whether this agent was started with the "bootstrap" configuration enabled.
MemberTagKeyBootstrapExpect is the key name of the tag used to indicate whether this agent was started with the "bootstrap_expect" configuration set to a non-zero value.
MemberTagKeyDatacenter is the key used to indicate which datacenter this member is in.
MemberTagKeyPartition is the key name of the tag used to indicate which partition this member is in.
MemberTagKeyReadReplica is the key used to indicate that the member is a read replica server (will remain a Raft non-voter).
MemberTagRole is the key used to indicate that the member is a server or not.
MemberTagKeySegment is the key name of the tag used to indicate which network segment this member is in.
MemberTagKeyUseTLS is the key name of the tag used to indicate whther this agent was configured to use TLS.
MemberTagValueBootstrap is the value of the MemberTagKeyBootstrap key when the agent was started with the "bootstrap" configuration enabled.
MemberTagValueReadReplica is the value of the MemberTagKeyReadReplica key when the member is in fact a read-replica.
MemberTagValueRoleClient is the value of the MemberTagKeyRole used to indicate that the member represents a Consul client.
MemberTagValueRoleServer is the value of the MemberTagKeyRole used to indicate that the member represents a Consul server.
MemberTagValueUseTLS is the value of the MemberTagKeyUseTLS when the agent was configured to use TLS.
No description provided by the author
No description provided by the author
MeshGatewayModeDefault represents no specific mode and should be used to indicate that a different layer of the configuration chain should take precedence.
MeshGatewayModeLocal represents that the Upstream Connect connections should be made to a mesh gateway in the local datacenter.
MeshGatewayModeNone represents that the Upstream Connect connections should be direct and not flow through a mesh gateway.
MeshGatewayModeRemote represents that the Upstream Connect connections should be made to a mesh gateway in a remote datacenter.
MutualTLSModeDefault represents no specific mode and should be used to indicate that a different layer of the configuration chain should take precedence.
MutualTLSModePermissive allows incoming non-mTLS traffic.
MutualTLSModeStrict requires mTLS for incoming traffic.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NodeMaint is the special key set by a node in maintenance mode.
No description provided by the author
PartitionDefaultName is the default partition value.
PeeringStateActive means that the peering connection is active and healthy.
PeeringStateDeleting means a peering was marked for deletion and is in the process of being deleted.
PeeringStateEstablishing means the peering is being established from a peering token.
PeeringStateFailing means the peering connection has been interrupted but has not yet been terminated.
PeeringStatePending means the peering was created by generating a peering token.
PeeringStateTerminated means the peering relationship has been removed.
PeeringStateUndefined represents an unset value for PeeringState during writes.
No description provided by the author
No description provided by the author
ProxyModeDefault represents no specific mode and should be used to indicate that a different layer of the configuration chain should take precedence.
ProxyModeDirect represents that the proxy's listeners must be dialed directly by the local application and other proxies.
ProxyModeTransparent represents that inbound and outbound application traffic is being captured and redirected through the proxy.
QueryBackendBlockingQuery Query backend of type blocking query.
QueryBackendStreaming Query backend of type streaming.
No description provided by the author
This condition indicates whether the route has been accepted or rejected by a Gateway, and why.
This condition indicates whether the route was able to successfully bind the Listener on the gateway Possible reasons for this condition to be true are: * "Bound" Possible reasons for this condition to be false are: * "FailedToBind" * "GatewayNotFound" .
This reason is used with the "Accepted" condition when the Route has been accepted by the Gateway.
This reason is used with the "Bound" condition when the condition is true.
This reason is used with the "Bound" condition when the route failed to bind to the gateway.
This reason is used with the "Bound" condition when the route fails to find the gateway.
This reason is used with the "Accepted" condition when the route has an invalid discovery chain, this includes conditions like the protocol being invalid or the discovery chain failing to compile.
This reason is used with the "Accepted" condition when the route references non-existent JWTProviders.
This reason is used with the "Accepted" condition when the route.
No description provided by the author
SemaphoreFlagValue is a magic flag we set to indicate a key is being used for a semaphore.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ServiceKindAPIGateway is an API Gateway for the Connect feature.
ServiceKindConnectProxy is a proxy for the Connect feature.
ServiceKindIngressGateway is an Ingress Gateway for the Connect feature.
ServiceKindMeshGateway is a Mesh Gateway for the Connect feature.
ServiceKindTerminatingGateway is a Terminating Gateway for the Connect feature.
ServiceKindTypical is a typical, classic Consul service.
ServiceMaintPrefix is the prefix for a service in maintenance mode.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SessionBehaviorDelete is new in Consul 0.5 and changes the behavior to delete all associated locks on session invalidation.
SessionBehaviorRelease is the default behavior and causes all associated locks to be released on session invalidation.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TelemetryCollectorName is the service name for the Consul Telemetry Collector.
No description provided by the author
UpstreamDestTypePreparedQuery discovers instances via prepared query execution.
UpstreamDestTypeService discovers instances via healthy service lookup.

# Variables

No description provided by the author
ErrLockConflict is returned if the flags on a key used for a lock do not match expectation.
ErrLockHeld is returned if we attempt to double lock.
ErrLockInUse is returned if we attempt to destroy a lock that is in use.
ErrLockNotHeld is returned if we attempt to unlock a lock that we do not hold.
ErrSemaphoreConflict is returned if the flags on a key used for a semaphore do not match expectation.
ErrSemaphoreHeld is returned if we attempt to double lock.
ErrSemaphoreInUse is returned if we attempt to destroy a semaphore that is in use.
ErrSemaphoreNotHeld is returned if we attempt to unlock a semaphore that we do not hold.
No description provided by the author

# Structs

AccessLogsConfig contains the associated default settings for all Envoy instances within the datacenter or partition.
ACL can be used to query the ACL endpoints.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ACLEntry is used to represent a legacy ACL token The legacy tokens are deprecated.
No description provided by the author
No description provided by the author
ACLNodeIdentity represents a high-level grant of all necessary privileges to assume the identity of the named Node in the Catalog and within Connect.
No description provided by the author
No description provided by the author
ACLPolicy represents an ACL Policy.
No description provided by the author
ACLReplicationStatus is used to represent the status of ACL replication.
ACLRole represents an ACL Role.
ACLServiceIdentity represents a high-level grant of all necessary privileges to assume the identity of the named Service in the Catalog and within Connect.
ACLTemplatedPolicy represents a template used to generate a `synthetic` policy given some input variables.
No description provided by the author
No description provided by the author
ACLToken represents an ACL Token.
No description provided by the author
No description provided by the author
No description provided by the author
Agent can be used to query the Agent endpoints.
AgentAuthorize is the response structure for Connect authorization.
AgentAuthorizeParams are the request parameters for authorizing a request.
AgentCheck represents a check known to the agent.
AgentCheckRegistration is used to register a new check.
AgentMember represents a cluster member known to the agent.
AgentService represents a service known to the agent.
AgentServiceCheck is used to define a node or service level check.
AgentServiceChecksInfo returns information about a Service and its checks.
AgentServiceConnect represents the Connect configuration of a service.
AgentServiceConnectProxyConfig is the proxy configuration in a connect-proxy ServiceDefinition or response.
AgentServiceRegistration is used to register a new service.
AgentToken is used when updating ACL tokens for an agent.
AgentWeights represent optional weights for a service.
APIGatewayConfigEntry manages the configuration for an API gateway with the given name.
APIGatewayJWTClaimVerification holds the actual claim information to be verified.
APIGatewayJWTProvider holds the provider and claim verification information.
APIGatewayJWTRequirement holds the list of JWT providers to be verified against.
APIGatewayListener represents an individual listener for an APIGateway.
APIGatewayPolicy holds the policy that configures the gateway listener, this is used in the `Override` and `Default` fields of a listener.
APIGatewayTLSConfiguration specifies the configuration of a listener’s TLS settings.
Area defines a network area.
AreaJoinResponse is returned when a join occurs and gives the result for each address.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AutopilotConfiguration is used for querying/setting the Autopilot configuration.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BootstrapRequest is used for when operators provide an ACL Bootstrap Token.
CAConfig is the structure for the Connect CA configuration.
CARoot represents a root CA certificate that is trusted.
CARootList is the structure for the results of listing roots.
Catalog can be used to query the Catalog endpoints.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CheckTxnOp defines a single operation inside a transaction.
Client provides a client to the Consul API.
CommonCAProviderConfig is the common options available to all CA providers.
No description provided by the author
No description provided by the author
Condition is used for a single message and state associated with an object.
Config is used to configure the creation of a client.
ConfigEntries can be used to query the Config endpoints.
ConfigEntryStatus is used for propagating back asynchronously calculated messages from control loops to a user.
Connect can be used to work with endpoints related to Connect, the feature for securely connecting services within Consul.
ConnectProxyConfig is the response structure for agent-local proxy configuration.
ConsulCAProviderConfig is the config for the built-in Consul CA provider.
ContentTypeRule defines a rule for determining the content type of an HTTP request.
CookieConfig contains configuration for the "cookie" hash policy type.
Coordinate can be used to query the coordinate endpoints.
CoordinateDatacenterMap has the coordinates for servers in a given datacenter and area.
CoordinateEntry represents a node and its associated network coordinate.
Debug can be used to query the /debug/pprof endpoints to gather profiling information about the target agent.Debug The agent must have enable_debug set to true for profiling to be enabled and for these endpoints to function.
DestinationConfig represents a virtual service, i.e.
DiscoveryChain can be used to query the discovery-chain endpoints.
No description provided by the author
No description provided by the author
compiled form of ServiceResolverFailover.
DiscoveryGraphNode is a single node in the compiled discovery chain.
compiled form of ServiceResolverConfigEntry.
compiled form of ServiceRoute.
compiled form of ServiceSplit.
DiscoveryTarget represents all of the inputs necessary to use a resolver config entry to execute a catalog query to generate a list of service instances during discovery.
EnvoyExtension has configuration for an extension that patches Envoy resources.
Event can be used to query the Event endpoints.
ExportedService manages the exporting of a service in the local partition to other partitions.
ExportedServicesConfigEntry manages the exported services for a single admin partition.
ExposeConfig describes HTTP paths to expose through Envoy outside of Connect.
No description provided by the author
No description provided by the author
No description provided by the author
GatewayService associates a gateway with a linked service.
No description provided by the author
No description provided by the author
No description provided by the author
GaugeValue stores one value that is updated as time goes on, such as the amount of memory allocated.
HashPolicy defines which attributes will be hashed by hash-based LB algorithms.
Health can be used to query the Health endpoints.
HealthCheck is used to represent a single check.
HealthCheckDefinition is used to store the details about a health check's execution.
HttpBasicAuth is used to authenticate http client with HTTP Basic Authentication.
HTTPFilters specifies a list of filters used to modify a request before it is routed to an upstream.
HTTPHeaderFilter specifies how HTTP headers should be modified.
HTTPHeaderMatch specifies how a match should be done on a request's headers.
HTTPHeaderModifiers is a set of rules for HTTP header modification that should be performed by proxies as the request passes through them.
HTTPMatch specifies the criteria that should be used in determining whether or not a request should be routed to a given set of services.
HTTPPathMatch specifies how a match should be done on a request's path.
HTTPQueryMatch specifies how a match should be done on a request's query parameters.
HTTPResponseFilters specifies a list of filters used to modify a response returned by an upstream.
HTTPRouteConfigEntry manages the configuration for a HTTP route with the given name.
HTTPRouteRule specifies the routing rules used to determine what upstream service an HTTP request is routed to.
HTTPService is a service reference for HTTP-based routing rules.
IngressGatewayConfigEntry manages the configuration for an ingress service with the given name.
IngressListener manages the configuration for a listener on a specific port.
IngressService manages configuration for services that are exposed to ingress traffic.
No description provided by the author
InlineCertificateConfigEntry -- TODO stub.
InstanceLevelRateLimits represents rate limit configuration that are applied per service instance.
InstanceLevelRouteRateLimits represents rate limit configuration applied to a route matching one of PathExact/PathPrefix/PathRegex.
Intention defines an intention for the Connect Service Graph.
IntentionCheck are the arguments for the intention check API.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IntentionMatch are the arguments for the intention match API.
No description provided by the author
Internal can be used to query endpoints that are intended for Hashicorp internal-use only.
JSONWebKeySet defines a key set, its location on disk, or the means with which to fetch a key set from a remote server.
No description provided by the author
No description provided by the author
JWKSTLSCertificate refers to the data containing certificate authority certificates to use in verifying a presented peer certificate.
No description provided by the author
JWKSTLSCertTrustedCA defines TLS certificate data containing certificate authority certificates to use in verifying a presented peer certificate.
No description provided by the author
JWTFilter specifies the JWT configuration for a route.
No description provided by the author
JWTLocation is a location where the JWT could be present in requests.
JWTLocationCookie defines how to extract a JWT from an HTTP request cookie.
JWTLocationHeader defines how to extract a JWT from an HTTP request header.
JWTLocationQueryParam defines how to extract a JWT from an HTTP request query parameter.
No description provided by the author
KeyringResponse is returned when listing the gossip encryption keys.
KubernetesAuthMethodConfig is the config for the built-in Consul auth method for Kubernetes.
KV is used to manipulate the K/V API.
KVPair is used to represent a single K/V entry.
KVTxnOp defines a single operation inside a transaction.
KVTxnResponse has the outcome of a transaction.
LeafCert is a certificate that has been issued by a Connect CA.
LeastRequestConfig contains configuration for the "least_request" policy type.
No description provided by the author
No description provided by the author
A LinkedService is a service represented by a terminating gateway.
LoadBalancer determines the load balancing policy and configuration for services issuing requests to this upstream service.
Locality identifies where a given entity is running.
LocalJWKS specifies a location for a local JWKS.
Lock is used to implement client-side leader election.
LockOptions is used to parameterize the Lock behavior.
MembersOpts is used for querying member information.
MeshConfigEntry manages the global configuration for all service mesh proxies.
MeshDirectionalHTTPConfig holds mesh configuration specific to HTTP requests for a given traffic direction.
No description provided by the author
MeshGatewayConfig controls how Mesh Gateways are used for upstream Connect services.
No description provided by the author
No description provided by the author
Metrics info is used to store different types of metric values from the agent.
Namespace is the configuration of a single namespace.
NamespaceACLConfig is the Namespace specific ACL configuration container.
Namespaces can be used to manage Namespaces in Consul Enterprise..
No description provided by the author
NodeTxnOp defines a single operation inside a transaction.
OIDCAuthMethodConfig is the config for the built-in Consul auth method for OIDC and JWT.
Operator can be used to perform low-level operator tasks for Consul.
OperatorHealthReply is a representation of the overall health of the cluster.
Partition is the configuration of a single admin partition.
Partitions can be used to manage Partitions in Consul Enterprise.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PointValue holds a series of points for a metric.
PreparedQuery can be used to query the prepared query endpoints.
PreparedQueryDefinition defines a complete prepared query.
PreparedQueryExecuteResponse has the results of executing a query.
No description provided by the author
QueryDNSOptions controls settings when query results are served over DNS.
QueryFailoverOptions sets options about how we fail over if there are no healthy nodes in the local datacenter.
No description provided by the author
QueryMeta is used to return meta data about a query.
QueryOptions are used to parameterize a query.
QueryTemplate carries the arguments for creating a templated query.
RaftConfiguration is returned when querying for the current Raft configuration.
RaftServer has information about a server in the Raft configuration.
No description provided by the author
RateLimits is rate limiting configuration that is applied to inbound traffic for a service.
Raw can be used to do raw queries against custom endpoints.
No description provided by the author
RemoteJWKS specifies how to fetch a JWKS from a remote server.
RequestNormalizationMeshConfig contains options pertaining to the normalization of HTTP requests processed by mesh proxies.
No description provided by the author
No description provided by the author
ResourceReference is a reference to a ConfigEntry with an optional reference to a subsection of that ConfigEntry that can be specified as SectionName.
No description provided by the author
No description provided by the author
RingHashConfig contains configuration for the "ring_hash" policy type.
No description provided by the author
No description provided by the author
SampledValue stores info about a metric that is incremented over time, such as the number of requests to an HTTP endpoint.
Semaphore is used to implement a distributed semaphore using the Consul KV primitives.
SemaphoreOptions is used to parameterize the Semaphore.
SerfMember is a generic structure for reporting information about members in a Serf cluster.
ServerHealth is the health (from the leader's point of view) of a server.
No description provided by the author
No description provided by the author
No description provided by the author
ServiceConsumer represents a downstream consumer of the service to be exported.
ServiceEntry is used for the health service endpoint.
No description provided by the author
ServiceQuery is used to query for a set of healthy nodes offering a specific service.
ServiceRegisterOpts is used to pass extra options to the service register.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ServiceTxnOp defines a single operation inside a transaction.
ServiceUsage contains information about the number of services and service instances for a datacenter.
Session can be used to query the Session endpoints.
SessionEntry represents a session in consul.
SessionTxnOp defines a single operation inside a transaction.
Snapshot can be used to query the /v1/snapshot endpoint to take snapshots of Consul's internal state and restore snapshots for disaster recovery.
No description provided by the author
Status can be used to query the Status endpoints.
No description provided by the author
TCPRouteConfigEntry -- TODO stub.
TCPService is a service reference for a TCPRoute.
TerminatingGatewayConfigEntry manages the configuration for a terminating gateway with the given name.
No description provided by the author
TLSConfig is used to generate a TLSClientConfig that's useful for talking to Consul using TLS.
TransferLeaderResponse is returned when querying for the current Raft configuration.
No description provided by the author
No description provided by the author
Txn is used to manipulate the Txn API.
TxnError is used to return information about an operation in a transaction.
TxnOp is the internal format we send to Consul.
TxnResponse is the internal format we receive from Consul.
TxnResult is the internal format we receive from Consul.
Upstream is the response structure for a proxy upstream configuration.
No description provided by the author
No description provided by the author
UpstreamLimits describes the limits that are associated with a specific upstream of a service instance.
No description provided by the author
No description provided by the author
UserEvent represents an event that was fired by the user.
No description provided by the author
WriteMeta is used to return meta data about a write.
WriteOptions are used to parameterize a write.

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BindingRuleBindType is the type of binding rule mechanism used.
CheckOp constants give possible operations available in a transaction.
No description provided by the author
No description provided by the author
GatewayConditionReason defines the set of reasons that explain why a particular Gateway condition type has been raised.
GatewayConditionType is a type of condition associated with a Gateway.
HealthChecks is a collection of HealthCheck structs.
HTTPHeaderMatchType specifies how header matching criteria should be applied to a request.
HTTPMatchMethod specifies which type of HTTP verb should be used for matching a given request.
HTTPPathMatchType specifies how path matching criteria should be applied to a request.
HTTPQueryMatchType specifies how querys matching criteria should be applied to a request.
IntentionAction is the action that the intention represents.
IntentionMatchType is the target for a match request.
IntentionSourceType is the type of the source within an intention.
KVOp constants give possible operations available in a transaction.
KVPairs is a list of KVPair objects.
KVTxnOps defines a set of operations to be performed inside a single transaction.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NodeOp constants give possible operations available in a transaction.
PeeringState enumerates all the states a peering can be in.
No description provided by the author
Deprecated: use QueryFailoverOptions instead.
ReadableDuration is a duration type that is serialized to JSON in human readable format.
RouteConditionReason is a reason for a route condition.
RouteConditionType is a type of condition for a route.
ServiceKind is the kind of service being registered.
ServiceOp constants give possible operations available in a transaction.
SessionOp constants give possible operations available in a transaction.
TxnErrors is a list of TxnError objects.
TxnOps is a list of transaction operations.
TxnResults is a list of TxnResult objects.
UpstreamDestType is the type of upstream discovery mechanism.