# Packages
Copyright (c) HashiCorp, Inc.
Package decode provides tools for customizing the decoding of configuration,
into structures using mapstructure.
No description provided by the author
No description provided by the author
No description provided by the author
Package mutex implements the sync.Locker interface using x/sync/semaphore.
No description provided by the author
No description provided by the author
Package semaphore implements a simple semaphore that is based on golang.org/x/sync/semaphore but doesn't support weights.
No description provided by the author
No description provided by the author
Copyright (c) HashiCorp, Inc.
Package ttlcache provides an ExpiryHeap that can be used by a cache to track the
expiration time of its entries.
# Functions
No description provided by the author
DecodeJSON is a convenience function to create a JSON decoder set it up to disallow unknown fields and then decode into the given value.
DurationMinusBuffer returns a duration, minus a buffer and jitter subtracted from the duration.
DurationMinusBufferDomain returns the domain of valid durations from a call to DurationMinusBuffer.
EnsurePath is used to make sure a path exists.
EnsureTrailingNewline adds a newline suffix to the input if not present.
No description provided by the author
InitTelemetry configures go-metrics based on map of telemetry config values as returned by Runtimecfg.Config().
IsErrEOF returns true if we get an EOF error from the socket itself, or an EOF equivalent error from yamux.
MapWalk will traverse through the supplied input which should be a map[string]interface{} (or something compatible that we can coerce to a map[string]interface{}) and from it create a new map[string]interface{} with all internal values coerced to JSON compatible types.
No description provided by the author
No description provided by the author
No description provided by the author
RandomStagger returns an interval between 0 and the duration.
RandomStaggerWithRange returns an interval between min and the max duration.
RateScaledInterval is used to choose an interval to perform an action in order to target an aggregate number of actions per second across the whole cluster.
TranslateKeys recursively translates all keys from m in-place to their canonical form as defined in dict which maps an alias name to the canonical name.
UnmarshalJSON is a convenience function around calling DecodeJSON.
UserAgent returns the consistent user-agent string for Consul.
# Structs
No description provided by the author
StopChannelContext implements the context.Context interface You provide the channel to select on to determine whether the context should be canceled and other code such as the rate.Limiter will automatically use the channel appropriately.
TelemetryConfig is embedded in config.RuntimeConfig and holds the configuration variables for go-metrics.
# Interfaces
MetricsHandler provides an http.Handler for displaying metrics.
# Type aliases
UUIDCheckFunc should determine whether the given UUID is actually unique and allowed to be used.