2023-02-15 01:10:11 +00:00
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
|
|
|
"dubbo.apache.org/dubbo-go/v3/config"
|
2023-02-24 02:51:35 +00:00
|
|
|
//_ "dubbo.apache.org/dubbo-go/v3/imports"
|
2023-02-23 13:45:59 +00:00
|
|
|
"github.com/fonchain/fonchain-artistinfo/pb/account"
|
2023-02-20 04:51:50 +00:00
|
|
|
"github.com/fonchain/fonchain-artistinfo/pb/artist"
|
2023-02-15 01:10:11 +00:00
|
|
|
)
|
|
|
|
|
2023-02-23 13:45:59 +00:00
|
|
|
var (
|
|
|
|
GrpcArtistImpl = new(artist.ArtistClientImpl)
|
2023-02-24 02:51:35 +00:00
|
|
|
|
|
|
|
AccountProvider = new(account.AccountClientImpl)
|
2023-02-23 13:45:59 +00:00
|
|
|
)
|
2023-02-15 01:10:11 +00:00
|
|
|
|
|
|
|
func init() {
|
|
|
|
config.SetConsumerService(GrpcArtistImpl)
|
2023-02-24 02:51:35 +00:00
|
|
|
config.SetConsumerService(AccountProvider)
|
|
|
|
//if os.Args[len(os.Args)-1] == "unit-test" {
|
|
|
|
// _ = os.Setenv(constant.ConfigFileEnvKey, "../../conf/dubbogo.yaml")
|
|
|
|
//}
|
|
|
|
//fmt.Println(os.Getenv(constant.ConfigFileEnvKey))
|
|
|
|
//if err := config.Load(); err != nil {
|
|
|
|
// panic(err)
|
|
|
|
//}
|
2023-02-15 01:10:11 +00:00
|
|
|
}
|