api.go 439 B

1234567891011121314151617181920212223
  1. package dao
  2. import (
  3. "go-common/app/job/live/xlottery/internal/conf"
  4. rcApi "go-common/app/service/live/rc/api/liverpc"
  5. "go-common/library/net/rpc/liverpc"
  6. )
  7. // RcApi liverpc reward-service api
  8. var RcApi *rcApi.Client
  9. // InitAPI init all service APIs
  10. func InitAPI() {
  11. RcApi = rcApi.New(getConf("rc"))
  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. }