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:
Luis Pater
2026-06-09 13:44:10 +08:00
parent 693ce1c55a
commit 41a4dba670
3 changed files with 88 additions and 2 deletions

View File

@@ -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