pub trait AuthRefresher:
Send
+ Sync
+ Debug {
// Required method
fn refresh_qot_login<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
In-process qot login refresh 抽象.
实装方负责: HTTP /authority/ POST 刷 tgtgt → 写回 disk credentials →
把 LoginCache 置为 is_logged_in=true.
调用方 (run_qot_login_health_loop) 会在调本 fn 之外维护
record_relogin_attempt() / record_relogin_success() /
record_relogin_failure() (per QotLoginHealth API).
MUST:
- honor 10s 超时, 用 [
tokio::time::timeout] 包裹各 network step - 不要 mutate per-broker cipher 状态 (绑用户显式
unlock-trade) - 失败 loud
Err(caller 推 backoff)