grpc.go 325 B

12345678910111213141516171819
  1. package dao
  2. import (
  3. broadcasrtService "go-common/app/service/live/broadcast-proxy/api/v1"
  4. )
  5. var (
  6. //BcastClient 弹幕服务
  7. BcastClient *broadcasrtService.Client
  8. )
  9. //InitGrpc 初始化grpcclient
  10. func InitGrpc() {
  11. var err error
  12. BcastClient, err = broadcasrtService.NewClient(nil)
  13. if err != nil {
  14. panic(err)
  15. }
  16. }