api.go 432 B

1234567891011121314151617181920212223
  1. package dao
  2. import (
  3. "go-common/app/admin/live/live-admin/conf"
  4. avApi "go-common/app/service/live/av/api/liverpc"
  5. "go-common/library/net/rpc/liverpc"
  6. )
  7. // AvApi liveRpc room-service api
  8. var AvApi *avApi.Client
  9. // InitAPI init all service APIs
  10. func InitAPI() {
  11. AvApi = avApi.New(getConf("av"))
  12. }
  13. func getConf(appName string) *liverpc.ClientConfig {
  14. c := conf.Conf.LiveRpc
  15. if c != nil {
  16. return c[appName]
  17. }
  18. return nil
  19. }