broadcast.go 546 B

12345678910111213141516171819
  1. package service
  2. import (
  3. "context"
  4. "go-common/app/interface/main/web/model"
  5. warden "go-common/app/service/main/broadcast/api/grpc/v1"
  6. "go-common/library/log"
  7. )
  8. // BroadServers broadcast server list.
  9. func (s *Service) BroadServers(c context.Context, platform string) (res *warden.ServerListReply, err error) {
  10. if res, err = s.broadcastClient.ServerList(c, &warden.ServerListReq{Platform: platform}); err != nil {
  11. log.Error("s.broadCastClient.ServerList(%s) error(%v)", platform, err)
  12. res = model.DefaultServer
  13. err = nil
  14. }
  15. return
  16. }