config

package
v0.0.0-...-b6b44b4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

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"`
}

Jump to

Keyboard shortcuts

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