config

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ApolloCfg      *apolloConfig.AppConfig
	ApolloCfg      *apollo.Config
	ApolloListener []string
	Item2Obj       = map[string]Load{}
)

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	Lock sync.Mutex
}

func (*Cfg) GetApollo

func (c *Cfg) GetApollo(name string, obj Load) (jsonObj *gjson.Json, err error)

func (*Cfg) GetDbFile

func (c *Cfg) GetDbFile(name string) (res *g.Var, err error)

func (*Cfg) GetFile

func (c *Cfg) GetFile(filename string, obj ...Load) (jsonObj *gjson.Json, err error)

func (*Cfg) GetUrlFile

func (c *Cfg) GetUrlFile(name string) (jsonObj *gjson.Json, err error)

getUrlFile 获取远程配置

type CustomChangeListener

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

阿波罗监听器

func (*CustomChangeListener) OnChange

func (c *CustomChangeListener) OnChange(changeEvent *storage.ChangeEvent)

func (*CustomChangeListener) OnNewestChange

func (c *CustomChangeListener) OnNewestChange(event *storage.FullChangeEvent)

type Load

type Load interface {
	Load(cfg ...string)
}

load接口定义了Load方法,用于加载数据

Jump to

Keyboard shortcuts

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