Description

Package toolbox healthcheck

type DatabaseCheck struct { }

func (dc *DatabaseCheck) Check() error {

if dc.isConnected() {
	return nil
} else {
	return errors.New("can't connect database")
 }

}

AddHealthCheck("database",&DatabaseCheck{})

more docs: http://beego.me/docs/module/toolbox.md

toolbox is referenced in 19 repositories

github.com/astaxie/beego github.com/gilala/hbeego github.com/gilala/hbjbeego

...