Documentation ¶
Overview ¶
Package config provides types and a function for getting grush configuration.
Configuration is read the file grush.ini. An possible content of such file could be
[default] port=8080 queueSize=100000 consumers=1000 storeType=redis
The storeType chooses an store and implies that there is a section in the configuration file for the type chosen
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { //Port to listen to Port string //Maximun number of request enqueued, waiting for being processed QueueSize int //Maximun number of concurrent requests being processed Consumers int //MongoDB host Mongo string //Database Database string //Petitions collection PetitionsColl string //Responses collection ResponsesColl string //Errors collection ErrorsColl string //Instance ID for isolating recoverers Instance string //Debug mgo DebugMgo bool //Log level: alert, info, debug LogLevel string //Timeout for DB operations in seconds Timeout int }
General configuration data
func ReadConfig ¶
ReadConfig reads configuration from file with name filename.
Click to show internal directories.
Click to hide internal directories.