package
1.21.0-rc1
Repository: https://github.com/hashicorp/consul.git
Documentation: pkg.go.dev

# README

Consul types Package

The Go language has a strong type system built into the language. The types package corrals named types into a single package that is terminal in go's import graph. The types package should not have any downstream dependencies. Each subsystem that defines its own set of types exists in its own file, but all types are defined in the same package.

Why

Everything should be made as simple as possible, but not simpler.

string is a useful container and underlying type for identifiers, however the string type is effectively opaque to the compiler in terms of how a given string is intended to be used. For instance, there is nothing preventing the following from happening:

// `map` of Widgets, looked up by ID
var widgetLookup map[string]*Widget
// ...
var widgetID string = "widgetID"
w, found := widgetLookup[widgetID]

// Bad!
var widgetName string = "name of widget"
w, found := widgetLookup[widgetName]

but this class of problem is entirely preventable:

type WidgetID string
var widgetLookup map[WidgetID]*Widget
var widgetName

TL;DR: intentions and idioms aren't statically checked by compilers. The types package uses Go's strong type system to prevent this class of bug.

# Functions

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

# Constants

This represents the existing LAN area that's built in to Consul.
This represents the existing WAN area that's built in to Consul.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Cipher suites used by both Envoy and Consul agent.
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
Older cipher suites not supported for Consul agent TLS, will eventually be removed from Envoy defaults.
No description provided by the author
No description provided by the author
TLS versions.
No description provided by the author
No description provided by the author
No description provided by the author
Explictly allow implementation to select TLS version May be useful to supercede defaults specified at a higher layer.
Error value, excluded from lookup maps.
Explicit unspecified zero-value to avoid overwriting parent defaults.

# Variables

NOTE: these currently map to the deprecated config strings to support the deployment pattern of upgrading servers first.
NOTE: This interface is deprecated in favor of tlsVersions and should be eventually removed in a future release.
No description provided by the author

# Type aliases

AreaID is a strongly-typed string used to uniquely represent a network area, which is a relationship between Consul servers.
CheckID is a strongly typed string used to uniquely represent a Consul Check on an Agent (a CheckID is not globally unique).
NodeID is a unique identifier for a node across space and time.
IANA cipher suite string constants as defined at https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml This is the total list of TLS 1.2-style cipher suites which are currently supported by either Envoy 1.21 or the Consul agent via Go, and may change as some older suites are removed in future Envoy releases and Consul drops support for older Envoy versions, and as supported cipher suites in the Go runtime change.
TLSVersion is a strongly-typed string for TLS versions.