conf

package
v0.0.0-...-15bed1d Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConf

type AppConf struct {
	LogSchemes log.OutputScheme       `desc:"注册自定义文件处理"`           // 注册自定义文件处理
	Log        map[string]log.Options `default:"app,server,debug"` // app: internal 打的日志,server:pkg 打的日志,debug: debugUser的打日志

	Mode  string `default:"dev"`
	HTTP  http.HTTPConf
	DBSet map[string]*struct {
		Prefix   string `default:"demo" desc:"redis 前缀"`
		Postgres pg.DB
		Redis    redis.Option
	} `default:"dev"`
	Bp      gameConf.BpConf `desc:"bp"`
	Profile pyroscope.ProfileConf
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(cfgFile string) *AppConf

func (*AppConf) Context

func (c *AppConf) Context() context.Context

func (*AppConf) GetYamlContent

func (c *AppConf) GetYamlContent() (string, error)

func (*AppConf) SetContext

func (c *AppConf) SetContext(ctx context.Context)

func (*AppConf) Watch

func (c *AppConf) Watch()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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