You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
465 B
25 lines
465 B
package global |
|
|
|
import ( |
|
"go-common/app/admin/main/up/conf" |
|
accgrpc "go-common/app/service/main/account/api" |
|
|
|
"github.com/pkg/errors" |
|
) |
|
|
|
var ( |
|
accCli accgrpc.AccountClient |
|
) |
|
|
|
// GetAccClient . |
|
func GetAccClient() accgrpc.AccountClient { |
|
return accCli |
|
} |
|
|
|
//Init init global |
|
func Init(c *conf.Config) { |
|
var err error |
|
if accCli, err = accgrpc.NewClient(c.GRPCClient.Account); err != nil { |
|
panic(errors.WithMessage(err, "Failed to dial account service")) |
|
} |
|
}
|
|
|