config

package
v0.0.0-...-134b71e Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoConfFile = errors.New("no configuration file specified")

Functions

This section is empty.

Types

type Config

type Config struct {
	Bind        string      `toml:"bind"`
	URL         string      `toml:"url"`
	ScriptDir   string      `toml:"script_dir"`
	WorkDir     string      `toml:"work_dir"`
	StoreDir    string      `toml:"store_dir"`
	MaxJobs     int         `toml:"max_jobs"`
	MaxExecTime int         `toml:"max_exec_time"`
	DB          DBConfig    `toml:"db"`
	Queue       QueueConfig `toml:"queue"`
	Slack       SlackConfig `toml:"slack"`
}

Config holds configuration read from config file.

func New

func New(file string) (*Config, error)

New reads configuration from a specified file and creates new Config object.

type DBConfig

type DBConfig struct {
	RedisURI string `toml:"redis_uri"`
}

type QueueConfig

type QueueConfig struct {
	DisqueURI string `toml:"disque_uri"`
}

type SlackConfig

type SlackConfig struct {
	Enabled    bool   `toml:"enabled"`
	WebhookURL string `toml:"webhook_url"`
	Channel    string `toml:"channel"`
}

Jump to

Keyboard shortcuts

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