#env #gcloud #google-cloud

gcloud-env

Read Google Cloud Run runtime environment

1 unstable release

0.1.0 Apr 26, 2022

#654 in Configuration

MIT license

3KB

gcloud-env

Read Google Cloud Run runtime environment as a Rust struct.

use gcloud_env::GCloudRunEnv;

fn main() {
    let genv = GCloudRunEnv::from_env().expect("Not running from Cloud Run");
    println!("Starting with config: {:?}", genv);
    start_server(genv.port);
}

Dependencies

~0.4–1MB
~22K SLoC