config

package
Version: v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Version = 1
)

Variables

This section is empty.

Functions

func NewClusterNode

func NewClusterNode(addrs []string) *backend.ClusterNode

func Parse

func Parse(conf string) error

Types

type ConfYaml

type ConfYaml struct {
	Debug   bool                   `yaml:"debug"`
	MinStep int                    `yaml:"minStep"`
	Logger  logger.LoggerSection   `yaml:"logger"`
	Backend backend.BackendSection `yaml:"backend"`
	HTTP    HTTPSection            `yaml:"http"`
	RPC     RPCSection             `yaml:"rpc"`
}
var (
	Config *ConfYaml
)

type HTTPSection

type HTTPSection struct {
	Enabled bool   `yaml:"enabled"`
	Access  string `yaml:"access"`
}

type IndexSection

type IndexSection struct {
	Path    string `yaml:"path"`
	Timeout int    `yaml:"timeout"`
}

type LoggerSection

type LoggerSection struct {
	Dir       string `yaml:"dir"`
	Level     string `yaml:"level"`
	KeepHours uint   `yaml:"keepHours"`
}

type RPCSection

type RPCSection struct {
	Enabled bool `yaml:"enabled"`
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL