Mirror of https://github.com/roostorg/osprey github.com/roostorg/osprey
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 68 lines 1.4 kB view raw
1use std::time::Duration; 2 3pub mod auth; 4pub mod gcp_metadata; 5pub mod grpc; 6mod root_ca_certificate; 7 8pub mod kms; 9pub mod pubsub; 10 11/// Common options for creating authenticated connections to Google Cloud APIs 12pub struct ConnectionOptions { 13 /// Request timeout 14 pub timeout: Duration, 15 16 /// Duration to wait before refreshing the access token used for talking to cloud APIs 17 pub token_refresh_period: Duration, 18} 19 20impl Default for ConnectionOptions { 21 fn default() -> ConnectionOptions { 22 Self { 23 timeout: Duration::from_secs(5), 24 token_refresh_period: Duration::from_secs(240000), // 4 Hours 25 } 26 } 27} 28 29pub mod google { 30 pub mod api { 31 tonic::include_proto!("google.api"); 32 } 33 34 pub mod iam { 35 pub mod v1 { 36 tonic::include_proto!("google.iam.v1"); 37 } 38 } 39 40 pub mod longrunning { 41 tonic::include_proto!("google.longrunning"); 42 } 43 44 pub mod rpc { 45 tonic::include_proto!("google.rpc"); 46 } 47 pub mod r#type { 48 tonic::include_proto!("google.r#type"); 49 } 50 51 pub mod crypto { 52 pub mod tink { 53 tonic::include_proto!("google.crypto.tink"); 54 } 55 } 56 57 pub mod pubsub { 58 pub mod v1 { 59 tonic::include_proto!("google.pubsub.v1"); 60 } 61 } 62 63 pub mod kms { 64 pub mod v1 { 65 tonic::include_proto!("google.cloud.kms.v1"); 66 } 67 } 68}