config

package
v0.0.0-...-42ae80f Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENV_PREFIX = "HLS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	// common configuration options
	Common struct {
		Listen         string `toml:"listen"`
		SslCertificate string `toml:"ssl_certificate"`
		SslPrivateKey  string `toml:"ssl_privatekey"`
		HlsPath        string `toml:"hls_path"`
		ViewerTimeout  int    `toml:"viewer_timeout"`
	} `toml:"common"`

	// influx database
	Influx struct {
		Address  string `toml:"address" env:"ADDR"`      // HLS_INFLUX_ADDR
		User     string `toml:"user" env:"USER"`         // HLS_INFLUX_USER
		Password string `toml:"password" env:"PASSWORD"` // HLS_INFLUX_PASSWORD
		Database string `toml:"database" env:"DB"`       // HLS_INFLUX_DB
	} `toml:"influx" env:"INFLUX"`
}

func Load

func Load(path string) (*Conf, error)

func (*Conf) IsSslEnabled

func (c *Conf) IsSslEnabled() bool

Jump to

Keyboard shortcuts

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