mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-09-03 06:35:00 +08:00
feat(auth): enhance plugin scheduler with HasScheduler support and fast-path tests
- Added `pluginSchedulerState` interface with `HasScheduler` method for improved plugin scheduler state checks. - Updated `Manager.hasPluginScheduler` to handle `HasScheduler` logic. - Implemented and tested fast-path handling for inactive plugin schedulers, including mixed provider scenarios. - Expanded unit test coverage to ensure correct behavior in various scheduler states.
This commit is contained in:
@@ -30,6 +30,10 @@ func (h *Host) PickAuth(ctx context.Context, req pluginapi.SchedulerPickRequest)
|
||||
return resp, true, nil
|
||||
}
|
||||
|
||||
func (h *Host) HasScheduler() bool {
|
||||
return h.schedulerRecord() != nil
|
||||
}
|
||||
|
||||
func (h *Host) schedulerRecord() *capabilityRecord {
|
||||
if h == nil {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user