Expand description
§svccat
Detect drift between your declared service catalog and what actually lives in the repository.
svccat is primarily a command-line tool (the svccat binary), but its core
engine is usable as a library. The typical flow is:
- Load the declared catalog with
manifest::Manifest::load. - Discover the services that actually exist on disk with
discovery::discover_services. - Compute drift between the two with
drift::analyze, which returns adrift::DriftReport. - Optionally render the report with the
reportmodule.
use std::path::Path;
use svccat::{discovery, drift, manifest::Manifest};
let root = Path::new(".");
let manifest = Manifest::load(&root.join("services.yaml"))?;
let discovered = discovery::discover_services(root, &manifest);
let report = drift::analyze(&manifest, &discovered, root);
println!("{} drift item(s)", report.drifts.len());§API stability
Only the modules documented here are part of the stable, semver-covered
public API: config, discovery, drift, manifest, and
report. Every other module is an implementation detail of the svccat
binary; such modules are hidden from these docs and may change in any
release. See docs/API_STABILITY.md for the full policy.