conf

package
v0.0.0-...-47f881f Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseYaml

func ParseYaml(configFile string) error

Types

type HistoryBlock

type HistoryBlock struct {
	From int64 `yaml:"from"`
	To   int64 `yaml:"to"`
}

type HistoryConf

type HistoryConf struct {
	ContentSql MySQL        `yaml:"mysql_content"`
	Hb         HistoryBlock `yaml:"history_block"`
	Mr         Mirror       `yaml:"mirror"`
	Logger     Log          `yaml:"log"`
	Apps       map[string]string
	Addrs      map[string]string
}

func GetConfig

func GetConfig() *HistoryConf

type Log

type Log struct {
	Path  string `yaml:"path"`
	Level string `yaml:"level"`
}

type Mirror

type Mirror struct {
	MirrorAddr    string `yaml:"mirror_addr"`
	MirrorAppName string `yaml:"mirror_app_name"`
}

type MySQL

type MySQL struct {
	Uri     string `yaml:"uri"`
	ShowSQL bool   `yaml:"show_sql"`
}

Jump to

Keyboard shortcuts

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