conf

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	LogConfig LogConfig       `mapstructure:"Log"`
	ApiConfig ServerApiConfig `mapstructure:"Api"`
}

func New

func New() *Conf

func (*Conf) LoadFromPath

func (p *Conf) LoadFromPath(filePath string) error

func (*Conf) Watch

func (p *Conf) Watch(filePath string, reload func()) error

type LogConfig

type LogConfig struct {
	Level  string `mapstructure:"Level"`
	Output string `mapstructure:"Output"`
	Access string `mapstructure:"Access"`
}

type NodeApiConfig

type NodeApiConfig struct {
	APIHost   string `mapstructure:"ApiHost"`
	NodeID    int    `mapstructure:"NodeID"`
	SecretKey string `mapstructure:"SecretKey"`
	NodeType  string `mapstructure:"NodeType"`
	Timeout   int    `mapstructure:"Timeout"`
}

type ServerApiConfig

type ServerApiConfig struct {
	ApiHost   string `mapstructure:"ApiHost"`
	ServerId  int    `mapstructure:"ServerID"`
	SecretKey string `mapstructure:"SecretKey"`
	Timeout   int    `mapstructure:"Timeout"`
}

Jump to

Keyboard shortcuts

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