MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / get_provider_record

Function get_provider_record

crates/openshell-server/src/grpc/provider.rs:147–158  ·  view source on GitHub ↗
(store: &Store, name: &str)

Source from the content-addressed store, hash-verified

145}
146
147pub(super) async fn get_provider_record(store: &Store, name: &str) -> Result<Provider, Status> {
148 if name.is_empty() {
149 return Err(Status::invalid_argument("name is required"));
150 }
151
152 store
153 .get_message_by_name::<Provider>(name)
154 .await
155 .map_err(|e| Status::internal(format!("fetch provider failed: {e}")))?
156 .ok_or_else(|| Status::not_found("provider not found"))
157 .map(redact_provider_credentials)
158}
159
160pub(super) async fn list_provider_records(
161 store: &Store,

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected