config

package
v4.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 1, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Redis                    *RedisConfig  `toml:"redis"`
	Backend                  *url.URL      `toml:"-"`
	Version                  string        `toml:"-"`
	DocumentRoot             string        `toml:"-"`
	DevelopmentMode          bool          `toml:"-"`
	Socket                   string        `toml:"-"`
	ProxyHeadersTimeout      time.Duration `toml:"-"`
	APILimit                 uint          `toml:"-"`
	APIQueueLimit            uint          `toml:"-"`
	APIQueueTimeout          time.Duration `toml:"-"`
	APICILongPollingDuration time.Duration `toml:"-"`
}

func LoadConfig added in v1.4.0

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

LoadConfig from a file

type RedisConfig added in v1.4.0

type RedisConfig struct {
	URL             TomlURL
	Sentinel        []TomlURL
	SentinelMaster  string
	Password        string
	DB              *int
	ReadTimeout     *TomlDuration
	WriteTimeout    *TomlDuration
	KeepAlivePeriod *TomlDuration
	MaxIdle         *int
	MaxActive       *int
}

type TomlDuration added in v1.4.1

type TomlDuration struct {
	time.Duration
}

func (*TomlDuration) UnmarshalTest added in v1.4.1

func (d *TomlDuration) UnmarshalTest(text []byte) error

type TomlURL added in v1.4.0

type TomlURL struct {
	url.URL
}

func (*TomlURL) UnmarshalText added in v1.4.0

func (u *TomlURL) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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