From f32c02b76a8622efc3b2f7cbbd929eea584a0e0e Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sun, 1 Oct 2023 08:47:34 +0800 Subject: [PATCH] 1 --- server/adminserver/app/app.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/adminserver/app/app.go b/server/adminserver/app/app.go index 7b8b041d..48ae0dd3 100644 --- a/server/adminserver/app/app.go +++ b/server/adminserver/app/app.go @@ -7,19 +7,29 @@ import ( ) type app struct { + initCb func() + unInitCb func() } func (this *app) GetPkgName() string { return "adminserver" } +func (this *app) Run(initCb func(), unInitCb func()) { + this.initCb = initCb + this.unInitCb = unInitCb + f5.Run(this) +} + func (this *app) Init() { f5.LoadMetaTable(mt.Table) this.registerDataSources() //ginMgr.init() + this.initCb() } func (this *app) UnInit() { + this.unInitCb() //ginMgr.unInit() }