photoncloud-monorepo/chainfire/chainfire-client/examples/cleanup.rs
centra 54e3a16091 fix(nix): Align service ExecStart with actual binary CLI interfaces
- chainfire: Fix binary name (chainfire-server → chainfire)
- fiberlb: Use --grpc-addr instead of --port
- flaredb: Use --addr instead of --api-addr/--raft-addr
- flashdns: Add --grpc-addr and --dns-addr flags
- iam: Use --addr instead of --port/--data-dir
- k8shost: Add --iam-server-addr for dynamic IAM port connection
- lightningstor: Add --in-memory-metadata for ChainFire fallback
- plasmavmc: Add ChainFire service dependency and endpoint env var
- prismnet: Use --grpc-addr instead of --port

These fixes are required for T039 production deployment. The
plasmavmc change specifically fixes the ChainFire port mismatch
(was hardcoded 50051, now uses chainfire.port = 2379).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 22:58:40 +09:00

27 lines
780 B
Rust

// Minimal cleanup utility for deleting stale deployer entries from ChainFire.
// Usage: cargo run -p chainfire-client --example cleanup
use chainfire_client::Client;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// ChainFire API endpoint
let mut client = Client::connect("http://127.0.0.1:7000").await?;
// Stale keys to remove
let keys = [
b"deployer/nodes/info/node-025456f1".as_ref(),
b"deployer/nodes/config/025456f142ee424b88cd8aba5cf6c16a".as_ref(),
];
for key in keys {
let deleted = client.delete(key).await?;
println!(
"delete {} -> {}",
String::from_utf8_lossy(key),
if deleted { "removed" } else { "not found" }
);
}
Ok(())
}