xinviper

package
v0.0.0-...-9fce8ae Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewViper

func NewViper(conf types.XinConfConf) types.XinConf

func NewViperConf

func NewViperConf(viper *viper.Viper, logger logertypes.XinLogger) types.XinConf

Types

type ViperConf

type ViperConf struct {
	// contains filtered or unexported fields
}

func (*ViperConf) ConfigKeyOnChange

func (v *ViperConf) ConfigKeyOnChange(key string, dataType any, deal func(after any))

ConfigOnChange key配置变更时对应的操作

func (*ViperConf) Unmarshal

func (v *ViperConf) Unmarshal(key string, val any) error

Unmarshal 对配置解析成对象

Jump to

Keyboard shortcuts

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