Example #1
0
func mkDaemonFromEngine(eng *engine.Engine, t Fataler) *daemon.Daemon {
	iDaemon := eng.HackGetGlobalVar("httpapi.daemon")
	if iDaemon == nil {
		panic("Legacy daemon field not set in engine")
	}
	daemon, ok := iDaemon.(*daemon.Daemon)
	if !ok {
		panic("Legacy daemon field in engine does not cast to *daemon.Daemon")
	}
	return daemon
}
Example #2
0
func getDaemon(eng *engine.Engine) *daemon.Daemon {
	return eng.HackGetGlobalVar("httpapi.daemon").(*daemon.Daemon)
}