Skip to main content

Module resolver

Module resolver 

Source
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§

AdjacentStrategy
隣接N件のみ見える戦略
AllVisibleStrategy
全員が見える戦略(デフォルト)
ContextResolver
コンテキスト解決器
EscalationOnlyStrategy
Escalation中のWorkerのみ見える戦略

Traits§

NeighborStrategy
Neighbor決定戦略