Documentation ¶
Index ¶
- type ConfigurationReader
- type ConsulConfigurationReader
- func (consul ConsulConfigurationReader) GetCassandraHosts() ([]string, error)
- func (consul ConsulConfigurationReader) GetCassandraKeyspace() (string, error)
- func (consul ConsulConfigurationReader) GetCassandraProtocolVersion() (int, error)
- func (consul ConsulConfigurationReader) GetListeningPort() (int, error)
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) // GetCassandraHosts returns the list of Cassandra host addresses. GetCassandraHosts() ([]string, error) // GetCassandraKeyspace returns the name of Cassandra key space that the service data is stored under. GetCassandraKeyspace() (string, error) // GetCassandraProtocolVersion returns the cassandra procotol version. GetCassandraProtocolVersion() (int, 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 CassandraHostsToOverride []string CassandraKeyspaceToOverride string CassandraProtocolVersionToOverride int }
ConsulConfigurationReader implements ConfigurationReader using Consul to provide access to all configurations parameters required by the service.
func (ConsulConfigurationReader) GetCassandraHosts ¶
func (consul ConsulConfigurationReader) GetCassandraHosts() ([]string, error)
GetCassandraHosts returns the list of Cassandra host addresses.
func (ConsulConfigurationReader) GetCassandraKeyspace ¶
func (consul ConsulConfigurationReader) GetCassandraKeyspace() (string, error)
GetCassandraKeyspace returns the name of Cassandra key space that the service data is stored under.
func (ConsulConfigurationReader) GetCassandraProtocolVersion ¶
func (consul ConsulConfigurationReader) GetCassandraProtocolVersion() (int, error)
GetCassandraProtocolVersion returns the Cassandra protocol version to be used when connecting to Cassandra database.
func (ConsulConfigurationReader) GetListeningPort ¶
func (consul ConsulConfigurationReader) GetListeningPort() (int, error)
GetListeningPort returns the port the service should listen on to serve the HTTP request