config

package
v0.0.0-...-4d05d93 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2015 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandLineConfiguration

type CommandLineConfiguration struct {
	ConfigFilePath string
}

func GetCommandLineConfiguration

func GetCommandLineConfiguration() (config *CommandLineConfiguration, err error)

GetCommandLineConfiguration parses and loads command-line configuration

type Config

func GetConfig

func GetConfig(configFilePath string) (config *Config, err error)

type DatabaseConnectOpts

type DatabaseConnectOpts struct {
	Addresses           []string
	Database            string
	AuthKey             string
	DiscoverHosts       bool
	Address             string
	Timeout             Duration
	WriteTimeout        Duration
	ReadTimeout         Duration
	MaxIdle             int
	MaxOpen             int
	NodeRefreshInterval Duration
	Log                 bool
	// contains filtered or unexported fields
}

func (DatabaseConnectOpts) LogFile

func (d DatabaseConnectOpts) LogFile() io.Writer

type Duration

type Duration struct {
	Int      int
	Duration time.Duration
}

func (*Duration) UnmarshalTOML

func (d *Duration) UnmarshalTOML(data []byte) (err error)

type HttpServer

type HttpServer struct {
	ListenHost string
	ListenPort string
}

type Logger

type Logger struct {
	LogFilePath  string
	Debug        bool
	LoggingLevel string
	LogFile      *reopen.FileWriter
}

type WebSocketConfig

type WebSocketConfig struct {
	WriteWait Duration
	// Time allowed to read the next pong message from the peer.
	PongWait Duration
	// Send pings to peer with this period. Must be less than pongWait.
	PingPeriod Duration
	// Maximum message size allowed from peer.
	MaxMessageSize  int64
	ReadBufferSize  int
	WriteBufferSize int
}

Jump to

Keyboard shortcuts

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