app/task/service.go

24 lines
521 B
Go

package task
type Service struct{}
func (srv Service) GetName() string { return "task.Service" }
func (srv Service) GetDependencies() []string { return []string{} }
func (srv Service) IsService() bool { return true }
func (srv Service) Init() error {
Init()
return nil
}
func (srv Service) Load() error { return nil }
func (srv Service) Main() error {
Start()
return nil
}
func (srv Service) Del() {
if c == nil {
return
}
<-Stop().Done()
}
func (srv Service) Health() error { return nil }