config

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 15 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultConfig is a default config.
	DefaultConfig config.Config
)

Functions

func AppScan

func AppScan() error

AppScan 框架默认配置

func ApplicationConfig

func ApplicationConfig() *v1.Next

ApplicationConfig 获取框架配置

func BizConfFile

func BizConfFile() string

BizConfFile returns the biz config filename.

func Close

func Close() error

Close closes the config source.

func Init

func Init(filename string) (kConfig.Config, error)

Init 初始化配置

func Load

func Load() error

Load loads config from config source.

func Scan

func Scan(v interface{}) error

Scan scans config into v.

func Value

func Value(key string) config.Value

Value gets the config value by key.

func Watch

func Watch(key string, o config.Observer) error

Watch watches config changes.

Types

type Config

type Config struct {
	kConfig.Config
	// contains filtered or unexported fields
}

func (*Config) Close

func (c *Config) Close() error

Jump to

Keyboard shortcuts

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