Skip to content

Commit

Permalink
feat(builtins)!: add worker.list, move spell.list to worker scope [fi…
Browse files Browse the repository at this point in the history
  • Loading branch information
justprosh committed Mar 30, 2023
1 parent 7cec3d1 commit 3884374
Show file tree
Hide file tree
Showing 8 changed files with 282 additions and 123 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions crates/key-manager/src/key_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ impl KeyManager {
.ok_or(WorkerNotFoundByDeal(deal_id))
}

pub fn list_workers(&self) -> Vec<WorkerId> {
self.worker_infos.read().keys().cloned().collect()
}

pub fn get_deal_id(&self, worker_id: PeerId) -> Result<DealId, KeyManagerError> {
self.worker_infos
.read()
Expand Down
Loading

0 comments on commit 3884374

Please sign in to comment.