node: Implement `seeds` control command

This commit is contained in:
Alexis Sellier 2023-02-05 01:05:07 +01:00
parent b542ddcd6c
commit a8531eff36
No known key found for this signature in database
1 changed files with 9 additions and 0 deletions

View File

@ -102,6 +102,15 @@ fn command<H: Handle<Error = runtime::HandleError, FetchResult = FetchResult>>(
fetch(rid, node, LineWriter::new(stream), handle)?;
}
}
Some(("seeds", arg)) => {
let rid: Id = arg
.parse()
.map_err(|e| CommandError::InvalidCommandArg(arg.to_owned(), Box::new(e)))?;
for seed in handle.seeds(rid)? {
writeln!(writer, "{seed}")?;
}
}
Some(("track-repo", arg)) => match arg.parse() {
Ok(id) => match handle.track_repo(id) {
Ok(updated) => {