tank/code/core/bean.go
2019-05-04 23:36:05 +08:00

16 lines
339 B
Go

package core
/**
* bean interface means singleton in application
*/
type Bean interface {
//init the bean when constructing
Init()
//cleanup the bean when system's cleanup
Cleanup()
//when everything(including db's connection) loaded, this method will be invoked.
Bootstrap()
//shortcut for panic check.
PanicError(err error)
}