Skip to main content

Crate headwaters_client

Crate headwaters_client 

Source
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 nodeId strings the lineage graph addresses nodes by.
types
The read-API message types, re-exported from headwaters_proto.

Structs§

HeadwatersClient
An async client for the Headwaters read API.
HeadwatersConfig
How a HeadwatersClient reaches 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-auth feature: one of aws, azure, gcp/google, or databricks.
ENV_TIMEOUT_MS
Environment variable holding the per-request timeout, in milliseconds.
ENV_TOKEN
Environment variable holding a bearer token for the authorization header.
ENV_URL
Environment variable holding the server base URL.