mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 13:00:52 +08:00
fix: keep round-robin as default routing
This commit is contained in:
@@ -120,7 +120,7 @@ type Manager struct {
|
||||
// NewManager constructs a manager with optional custom selector and hook.
|
||||
func NewManager(store Store, selector Selector, hook Hook) *Manager {
|
||||
if selector == nil {
|
||||
selector = &FillFirstSelector{}
|
||||
selector = &RoundRobinSelector{}
|
||||
}
|
||||
if hook == nil {
|
||||
hook = NoopHook{}
|
||||
|
||||
@@ -205,10 +205,10 @@ func (b *Builder) Build() (*Service, error) {
|
||||
}
|
||||
var selector coreauth.Selector
|
||||
switch strategy {
|
||||
case "round-robin", "roundrobin", "rr":
|
||||
selector = &coreauth.RoundRobinSelector{}
|
||||
default:
|
||||
case "fill-first", "fillfirst", "ff":
|
||||
selector = &coreauth.FillFirstSelector{}
|
||||
default:
|
||||
selector = &coreauth.RoundRobinSelector{}
|
||||
}
|
||||
|
||||
coreManager = coreauth.NewManager(tokenStore, selector, nil)
|
||||
|
||||
Reference in New Issue
Block a user