Documentation ¶
Index ¶
- Constants
- Variables
- func InstallExt(ctrlName string, mc IMCGeter)
- func PreUnload(name string) error
- type IMCGeter
- type ISettinger
- type Setting
- func (this *Setting) Content(name string) string
- func (this *Setting) Count() int
- func (this *Setting) HandleGore() *cto.Gore
- func (this *Setting) HandleInit()
- func (this *Setting) HandleTerm()
- func (this *Setting) HandleTick(now time.Time)
- func (this *Setting) HasUnit(name string) int
- func (this *Setting) Load(name string, handle ISettinger) error
- func (this *Setting) Mount(source TUnits)
- func (this *Setting) Overview() string
- func (this *Setting) Reload(name string) error
- type TUnits
- type Unit
Constants ¶
View Source
const ( DEF_SETTING_MSIZE = 10 // 系统配置数量默认初始化值 DEF_SETT_RELOAD_GAP = 10 // 配置热更新检测间隔(s) )
Variables ¶
View Source
var (
ErrUnwantReload = errors.New("ErrUnwantReload")
)
Functions ¶
Types ¶
type IMCGeter ¶
type IMCGeter interface { cto.ICtrlHandler // 获取基类配置 HandleSetting() *Setting }
=> 配置管理器接口
type ISettinger ¶
type ISettinger interface { // 配置初加载 HandleInit() error // 配置名称 HandlePath() string // 配置内容 HandleContent() string // 配置热加载[自行保证线程安全] HandleReload() error }
=> 配置文件接口
type Setting ¶
type Setting struct { cto.ControlBase // contains filtered or unexported fields }
func (*Setting) HandleGore ¶
func (*Setting) HandleInit ¶
func (this *Setting) HandleInit()
func (*Setting) HandleTerm ¶
func (this *Setting) HandleTerm()
func (*Setting) HandleTick ¶
func (*Setting) Load ¶
func (this *Setting) Load(name string, handle ISettinger) error
Setting.Load 加载配置
Click to show internal directories.
Click to hide internal directories.