config

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RPCHost             string
	RedisURL            string
	RedisChannel        string
	Host                string
	Port                int
	Path                string
	HealthPath          string
	Headers             []string
	SSL                 SSLOptions
	MaxMessageSize      int64
	DisconnectRate      int
	LogLevel            string
	LogFormat           string
	MetricsLog          bool
	MetricsLogInterval  int
	MetricsLogFormatter string
	MetricsHTTP         string
	MetricsHost         string
	MetricsPort         int
}

Config contains main application configuration

func New

func New() Config

New returns a new empty config

func (*Config) MetricsHTTPEnabled

func (c *Config) MetricsHTTPEnabled() bool

MetricsHTTPEnabled returns true iff MetricsHTTP is not empty

func (*Config) MetricsLogEnabled

func (c *Config) MetricsLogEnabled() bool

MetricsLogEnabled returns true iff MetricsLog is true

func (*Config) MetricsLogFormatterEnabled

func (c *Config) MetricsLogFormatterEnabled() bool

MetricsLogFormatterEnabled returns true iff MetricsLogFormatter is not empty

type SSLOptions

type SSLOptions struct {
	CertPath string
	KeyPath  string
}

SSLOptions contains SSL parameters

func (*SSLOptions) Available

func (opts *SSLOptions) Available() bool

Available returns true iff certificate and private keys are set

Jump to

Keyboard shortcuts

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