mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 13:00:52 +08:00
feat(auth): implement incremental auth updates with queue integration
- Added support for incremental auth updates using `AuthUpdate` and `AuthUpdateAction`. - Integrated `SetAuthUpdateQueue` to propagate updates through a dedicated channel. - Introduced new methods for handling auth add, modify, and delete actions. - Updated service to ensure auth update queues are correctly initialized and consumed. - Improved auth state synchronization across core and file-based clients with real-time updates. - Refactored redundant auth handling logic for better efficiency and maintainability.
This commit is contained in:
@@ -25,5 +25,8 @@ func defaultWatcherFactory(configPath, authDir string, reload func(*config.Confi
|
||||
w.SetConfig(cfg)
|
||||
},
|
||||
snapshotAuths: func() []*coreauth.Auth { return w.SnapshotCoreAuths() },
|
||||
setUpdateQueue: func(queue chan<- watcher.AuthUpdate) {
|
||||
w.SetAuthUpdateQueue(queue)
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user