feat(v2): gateway 经 Picker 路由选账户 + retry 换号(ExcludeAccounts);替换首个 enabled
This commit is contained in:
@@ -44,7 +44,8 @@ func buildEngineWithStore(t *testing.T) (*gin.Engine, *store.OrderStore) {
|
||||
areg := accounts.New([]config.AccountConfig{
|
||||
{AccountID: "fake-a1", Channel: "fake", Region: "global", Enabled: true, Weight: 1},
|
||||
})
|
||||
g := gateway.New(orders, preg, areg, oneResolver{}, nopEnqueuer{}, "global")
|
||||
picker := accounts.NewRouter(areg, nil, nil)
|
||||
g := gateway.New(orders, preg, picker, oneResolver{}, nopEnqueuer{}, "global")
|
||||
r := gin.New()
|
||||
router.SetupV2(r, g)
|
||||
return r, orders
|
||||
|
||||
Reference in New Issue
Block a user