27 lines
667 B
Go
27 lines
667 B
Go
package service
|
|
|
|
import (
|
|
"dubbo.apache.org/dubbo-go/v3/config"
|
|
//_ "dubbo.apache.org/dubbo-go/v3/imports"
|
|
"github.com/fonchain/fonchain-artistinfo/pb/account"
|
|
"github.com/fonchain/fonchain-artistinfo/pb/artist"
|
|
)
|
|
|
|
var (
|
|
GrpcArtistImpl = new(artist.ArtistClientImpl)
|
|
|
|
AccountProvider = new(account.AccountClientImpl)
|
|
)
|
|
|
|
func init() {
|
|
config.SetConsumerService(GrpcArtistImpl)
|
|
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)
|
|
//}
|
|
}
|