Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 790 Bytes

File metadata and controls

27 lines (18 loc) · 790 Bytes

cloudsqlconn

A Rust connector for Google Cloud SQL. Provides secure, authenticated connections to Cloud SQL instances using IAM authentication and automatic certificate management.

Features

  • Automatic TLS certificate management with background refresh
  • IAM-based authentication
  • Connection pooling via deadpool
  • Support for both public and private IP connections

Usage

use cloudsqlconn::{CloudSqlConfig, CloudSqlConnector};

let config = CloudSqlConfig::new("my-project:us-central1:my-instance")
    .with_iam_auth(true);

let connector = CloudSqlConnector::new(config).await?;
let pool = connector.create_pool("my_database", "my_user", None)?;
let conn = pool.get().await?;

License

MIT