Expand description
This crate provides an autogenerated gRPC client for the QCS API, along with helper utilities for automatically loading credentials from a user’s QCS config and keeping authentication tokens refreshed.
get_channel: create aChannelto the given gRPC endpoint with QCS authentication automatically set up.wrap_channel: wrap an existingChannelwith QCS authentication.
§Quick Start
use qcs_api_client_grpc::get_channel;
use qcs_api_client_grpc::services::controller::controller_client::ControllerClient;
use qcs_api_client_grpc::services::translation::translation_client::TranslationClient;
async fn controller_request() {
let uri = "example.per-qpu.rigetti.com:50000".parse().unwrap();
let channel = get_channel(uri).unwrap();
let mut client = ControllerClient::new(channel);
// Use the client
}
fn translation_request() {
let uri = "example.translation.rigetti.com:50000".parse().unwrap();
let channel = get_channel(uri).unwrap();
let mut client = TranslationClient::new(channel);
// Use the client
}§Crate features
server: include the generated server code for both Controller Service and Translation Serviceregen: regenerate the protobuf code and store it in./src/gen
By default, both features are disabled.
Re-exports§
pub use crate::tonic::get_channel;pub use crate::tonic::get_channel_with_timeout;pub use crate::tonic::get_endpoint;pub use crate::tonic::get_endpoint_with_timeout;pub use crate::tonic::get_wrapped_channel;pub use crate::tonic::wrap_channel;
Modules§
- client_
configuration - By default, all settings are loaded from files located under your home directory in the
.qcsfolder. Within that folder: - models
- services
- tonic
- Utilities for creating and working with [
Channel]s.