Skip to content

Commit

Permalink
incl seqnum
Browse files Browse the repository at this point in the history
  • Loading branch information
shikhar committed Dec 6, 2024
1 parent c152f81 commit b21d91c
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,14 +600,19 @@ async fn run() -> Result<(), S2CliError> {
let cfg = config::load_config(&config_path)?;
let client_config = client_config(cfg.auth_token)?;
let stream_client = StreamClient::new(client_config, basin, stream);
StreamService::new(stream_client)
let out = StreamService::new(stream_client)
.append_command_record(
CommandRecord::trim(trim_point),
fencing_token,
match_seq_num,
)
.await?;
eprintln!("{}", "✓ Trim requested".green().bold());
eprintln!(
"{}",
format!("✓ Trim requested at seq_num={}", out.start_seq_num)
.green()
.bold()
);
}

Commands::Fence {
Expand All @@ -620,14 +625,19 @@ async fn run() -> Result<(), S2CliError> {
let cfg = config::load_config(&config_path)?;
let client_config = client_config(cfg.auth_token)?;
let stream_client = StreamClient::new(client_config, basin, stream);
StreamService::new(stream_client)
let out = StreamService::new(stream_client)
.append_command_record(
CommandRecord::fence(new_fencing_token),
fencing_token,
match_seq_num,
)
.await?;
eprintln!("{}", "✓ Fencing token set".green().bold());
eprintln!(
"{}",
format!("✓ Fencing token set at seq_num: {}", out.start_seq_num)
.green()
.bold()
);
}

Commands::Append {
Expand Down

0 comments on commit b21d91c

Please sign in to comment.