config

package
v0.2.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2014 License: MIT Imports: 3 Imported by: 0

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

func ReadConfig(filename string) (*Config, error)

ReadConfig reads configuration from file with name filename.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL