appconfig

package
v2.1.42 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseConfig

func ParseConfig(confPath string, configPtr *AppConfig) (err error)

Types

type AppConfig

type AppConfig struct {
	Env env.Option

	FilterKeys   []string
	Log          Log
	Default      Default
	AsyncService AsyncService
}

func MustLoadAppConfig

func MustLoadAppConfig(configPath string) *AppConfig

MustLoadAppConfig 加载 app.toml ,若失败,会 panic

func (*AppConfig) Check

func (c *AppConfig) Check() (err error)

type AsyncService added in v2.1.40

type AsyncService struct {
	Support         bool
	QueueSize       int
	ConsumerSize    int
	TaskMaxRetryCnt int
}

type Default added in v2.1.40

type Default struct {
	MySQLSupport      bool
	SQLiteSupport     bool
	ClickhouseSupport bool
	RedisSupport      bool
	MongoDBSupport    bool
	LRUCacheSupport   bool
	AliyunOSSSupport  bool
}

type Log added in v2.1.40

type Log struct {
	LogDir                 string
	UseRotateLog           bool
	StdRedirectFileSupport bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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