Def.go 338 B

12345678910111213141516171819202122232425
  1. /*
  2. @Time : 2020/9/8 10:01
  3. @Author : xuhanlin
  4. @File : Def.go
  5. @Description :
  6. */
  7. package service
  8. import "sync"
  9. type Msg struct {
  10. Cmd string
  11. Args []interface{}
  12. Sync bool
  13. Done chan []interface{}
  14. }
  15. type Handler interface {
  16. Init(ch chan Msg, wg *sync.WaitGroup, args ...interface{}) error
  17. UnInit()
  18. Shutdown()
  19. Status() bool
  20. Run()
  21. }