Expand description
An async Rust client for the Headwaters read API.
HeadwatersClient wraps the generated ConnectRPC client with one method
per read RPC, returning owned response messages. Build one from a base URL:
use headwaters_client::HeadwatersClient;
let client = HeadwatersClient::connect("http://localhost:8091")?;
// Browse, then walk the lineage graph.
let dataset = client.get_dataset("analytics", "orders").await?;
let node = headwaters_client::dataset_node_id("analytics", "orders");
let graph = client.get_lineage(&node, 2).await?;
println!("{} reachable nodes", graph.graph.len());The open-ended facets / data / fields / events fields on the response
messages are google.protobuf.Struct; struct_to_json turns one into a
serde_json::Value.
Re-exports§
pub use nodeid::dataset_field_node_id;pub use nodeid::dataset_node_id;pub use nodeid::job_node_id;pub use types::*;
Modules§
- nodeid
- Build the
nodeIdstrings the lineage graph addresses nodes by. - types
- The read-API message types, re-exported from
headwaters_proto.
Structs§
- Headwaters
Client - An async client for the Headwaters read API.
- Headwaters
Config - How a
HeadwatersClientreaches the server.
Enums§
- Error
- An error from constructing or calling the Headwaters read API.
Constants§
- DEFAULT_
TIMEOUT - Default per-request timeout when none is configured.
- ENV_
AUTH - Environment variable selecting a cloud-auth provider for the
cloud-authfeature: one ofaws,azure,gcp/google, ordatabricks. - ENV_
TIMEOUT_ MS - Environment variable holding the per-request timeout, in milliseconds.
- ENV_
TOKEN - Environment variable holding a bearer token for the
authorizationheader. - ENV_URL
- Environment variable holding the server base URL.