Skip to content

Commit

Permalink
docs(iroh-cli): update gossip command documentation (#2706)
Browse files Browse the repository at this point in the history
## Description

Update documentation to `console` commands.

This partially addresses #2660, and belongs to a series of PRs to
complete it

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

Imports have been formated to be grouped.

## Change checklist

- [ ] Self-review.
- [X] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
  • Loading branch information
palozano authored Sep 6, 2024
1 parent 098b11f commit bdaeba1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions iroh-cli/src/commands/gossip.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
//! Define the gossiping subcommands.

use anyhow::{Context, Result};
use bao_tree::blake3;
use clap::{ArgGroup, Subcommand};
use futures_lite::StreamExt;
use futures_util::SinkExt;
use iroh::client::gossip::SubscribeOpts;
use iroh::client::Iroh;
use iroh::net::NodeId;
use iroh::{
client::{gossip::SubscribeOpts, Iroh},
net::NodeId,
};
use tokio::io::AsyncBufReadExt;

/// Commands to manage gossiping.
#[derive(Subcommand, Debug, Clone)]
#[allow(clippy::large_enum_variant)]
pub enum GossipCommands {
Expand All @@ -33,6 +37,7 @@ pub enum GossipCommands {
}

impl GossipCommands {
/// Runs the gossip command given the iroh client.
pub async fn run(self, iroh: &Iroh) -> Result<()> {
match self {
Self::Subscribe {
Expand Down

0 comments on commit bdaeba1

Please sign in to comment.