Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigurationReader ¶
type ConfigurationReader interface { // GetListeningPort returns the port the application should start listening on. GetListeningPort() (int, error) // GetOverrideHostname returns the overridden hostname to be used by the service discovery. If provided, the IP addresses or hostname // provided by the service must be overridden by this parameter. // This parameter is meant to be used in development environment. GetOverrideHostname() (string, error) }
ConfigurationReader defines the interface that provides access to all configurations parameters required by the service.
type ConsulConfigurationReader ¶
type ConsulConfigurationReader struct { ConsulAddress string ConsulScheme string ListeningPortToOverride int OverrideHostnameToOverride string }
ConsulConfigurationReader implements ConfigurationReader using Consul to provide access to all configurations parameters required by the service.
func (ConsulConfigurationReader) GetListeningPort ¶
func (consul ConsulConfigurationReader) GetListeningPort() (int, error)
GetListeningPort returns the port the application should start listening on. Returns either the listening port or error if something goes wrong.
func (ConsulConfigurationReader) GetOverrideHostname ¶
func (consul ConsulConfigurationReader) GetOverrideHostname() (string, error)
GetOverrideHostname returns the overridden hostname to be used by the service discovery. If provided, the IP addresses or hostname provided by the service must be overridden by this parameter. This parameter is meant to be used in development environment.