config

package
v1.68.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: MIT Imports: 8 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 {
	VirtualStorageName string `toml:"virtual_storage_name"`
	ListenAddr         string `toml:"listen_addr"`
	SocketPath         string `toml:"socket_path"`

	Nodes []*models.Node `toml:"node"`

	Logging              config.Logging `toml:"logging"`
	PrometheusListenAddr string         `toml:"prometheus_listen_addr"`
	Auth                 auth.Config    `toml:"auth"`
}

Config is a container for everything found in the TOML config file

func FromFile

func FromFile(filePath string) (Config, error)

FromFile loads the config for the passed file path

func (Config) ConfigureLogger

func (c Config) ConfigureLogger() *logrus.Entry

ConfigureLogger applies the settings from the configuration file to the logger, setting the log level and format.

func (Config) Validate

func (c Config) Validate() error

Validate establishes if the config is valid

Jump to

Keyboard shortcuts

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