Documentation
¶
Overview ¶
Package listenaddress provides a configuration struct for resolving a listen address from YAML.
Deprecation notice: The environment resolution behavior of this class has largely been superseded by config environment interpolation in go.uber.org/config (see config/README.md for details). Instead of:
listenAddress:
type: environment
envVarListenPort: MY_PORT_VAR
one can do:
listenAddress:
value: 0.0.0.0:${MY_PORT_VAR}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct {
// DeprecatedListenAddressType is the port type for the port
// DEPRECATED: use config interpolation with `value` (config/README.md)
DeprecatedListenAddressType Resolver `yaml:"type"`
// Value is the config specified listen address if using config port type.
Value *string `yaml:"value"`
// EnvVarListenPort specifies the environment variable name for the listen address port.
// DEPRECATED: use config interpolation with `value` (config/README.md)
DeprecatedEnvVarListenPort *string `yaml:"envVarListenPort"`
// DeprecatedEnvVarListenHost specifies the environment variable name for the listen address hostname.
// DEPRECATED: use config interpolation with `value` (config/README.md)
DeprecatedEnvVarListenHost *string `yaml:"envVarListenHost"`
}
Configuration is the configuration for resolving a listen address.
func (Configuration) Resolve ¶
func (c Configuration) Resolve() (string, error)
Resolve returns the resolved listen address given the configuration.
Click to show internal directories.
Click to hide internal directories.