main.go 616 B

1234567891011121314151617181920212223242526272829303132
  1. package main
  2. import (
  3. //"github.com/sirupsen/logrus"
  4. "lc-smartX/lc"
  5. "lc-smartX/util/gopool"
  6. //"lc-smartX/util/gopool"
  7. //"net"
  8. //"time"
  9. //
  10. //"lc-smartX/util/gopool"
  11. "time"
  12. //
  13. //"lc-smartX/util/gopool"
  14. //"net"
  15. //"os"
  16. //"time"
  17. )
  18. func main() {
  19. gopool.SetCap(64)
  20. gopool.Go(lc.StartEventServer)
  21. //等事件服务先启动
  22. time.Sleep(1 * time.Second)
  23. is := &lc.IntersectionServer{
  24. Main: time.NewTicker(5 * time.Second), //主路状态回滚
  25. Sub: time.NewTicker(5 * time.Second), //支路状态回滚
  26. ReTicker: time.NewTicker(19 * time.Second), //重连
  27. }
  28. lc.StartSmartXServer(is)
  29. }