configs

package
v0.0.0-...-be9014a Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(config interface{}, configFile string) error

Parse method to read TOML file and convert it into a struct

Types

type EngineConfig

type EngineConfig struct {
	Name   string
	Config string
}

EngineConfig structure from configuration file

type MirrorConfig

type MirrorConfig struct {
	Timer  string
	Puller EngineConfig `toml:"puller"`
	Pusher EngineConfig `toml:"pusher"`
}

MirrorConfig structure from configuration file

type TomlConfig

type TomlConfig struct {
	LogDir    string                  `toml:"log_dir"`
	LogFormat string                  `toml:"log_format"`
	LogLevel  string                  `toml:"log_level"`
	Mirrors   map[string]MirrorConfig `toml:"mirrors"`
}

TomlConfig structure from configuration file

Jump to

Keyboard shortcuts

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