Documentation
¶
Index ¶
Constants ¶
View Source
const (
// JSONFormat is for the logging format.
JSONFormat = "json"
)
Variables ¶
View Source
var (
// ConfigType holds the supported type.
ConfigType = "yaml"
)
Functions ¶
This section is empty.
Types ¶
type BikeConfiguration ¶
type BikeConfiguration struct { Server Server Logging Logging Monitoring Monitoring Database Database Messaging struct { Consumption Consumption } }
BikeConfiguration specifies general configurations for the bike service.
func GetBikeConfiguration ¶
func GetBikeConfiguration(path, databaseURL, consumerSOCKET string) (*BikeConfiguration, error)
GetBikeConfiguration returns valid configuration to run a bike service.
type Consumption ¶
Consumption for messaging.
type GatewayConfiguration ¶
type GatewayConfiguration struct { Server Server Logging Logging Monitoring Monitoring Limiter Limiter Messaging struct { Emission Emission } // BikeURL is the base url to bike service. BikeURL string // TripURL is the base url to trip service. TripURL string }
GatewayConfiguration specifies general configurations for the gateway service.
func GetGatewayConfiguration ¶
func GetGatewayConfiguration(path, bikeURL, tripURL string, nsq string) (*GatewayConfiguration, error)
GetGatewayConfiguration returns valid configuration to run the API gateway.
type Logging ¶
type Logging struct { // Standard log level // Example: // panic, // fatal, // error, // warn, warning, // info, // debug Level string // logging format // only json or plain text are supported Format string }
Logging holds log configuration.
type Monitoring ¶
Monitoring holds monitoring configuration. (for things, like statsd or else).
type TripConfiguration ¶
type TripConfiguration struct { Server Server Logging Logging Monitoring Monitoring Database Database Messaging struct { Consumption Consumption } }
TripConfiguration specifies general configurations for the trip service.
func GetTripConfiguration ¶
func GetTripConfiguration(path, databaseURL, consumerSOCKET string) (*TripConfiguration, error)
GetTripConfiguration returns valid configuration to run a trip service.
Click to show internal directories.
Click to hide internal directories.