Expand description
ContextResolver - スコープに応じたコンテキスト解決
ContextStore + ContextView → ResolvedContext の変換を担当。
§使用例
ⓘ
let store = ContextStore::new(tick)
.with_worker(worker_ctx)
.with_manager(mgr_ctx);
// Manager用(全体が見える)
let mgr_view = ContextView::global(ManagerId(0));
let mgr_context = ContextResolver::resolve(&store, &mgr_view);
// Worker用(自分 + Neighbor のみ)
let worker_view = ContextView::local_with_neighbors(
WorkerId(0),
vec![WorkerId(1)],
);
let worker_context = ContextResolver::resolve(&store, &worker_view);Structs§
- Adjacent
Strategy - 隣接N件のみ見える戦略
- AllVisible
Strategy - 全員が見える戦略(デフォルト)
- Context
Resolver - コンテキスト解決器
- Escalation
Only Strategy - Escalation中のWorkerのみ見える戦略
Traits§
- Neighbor
Strategy - Neighbor決定戦略