Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32948102
D6384.1768267072.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
865 B
Referenced Files
None
Subscribers
None
D6384.1768267072.diff
View Options
diff --git a/services/backup/src/blob/mod.rs b/services/backup/src/blob/mod.rs
--- a/services/backup/src/blob/mod.rs
+++ b/services/backup/src/blob/mod.rs
@@ -1,6 +1,7 @@
mod proto {
tonic::include_proto!("blob");
}
+use proto::blob_service_client::BlobServiceClient;
pub use proto::put_request::Data as PutRequestData;
pub use proto::{PutRequest, PutResponse};
@@ -8,3 +9,14 @@
mod uploader;
pub use downloader::*;
pub use uploader::*;
+
+pub type BlobClient = BlobServiceClient<tonic::transport::Channel>;
+
+/// Creates a new Blob service client instance. It does not attempt to connect
+/// to the service until first use.
+pub fn init_blob_client() -> BlobClient {
+ let service_url = &crate::CONFIG.blob_service_url;
+ let channel =
+ tonic::transport::Channel::from_static(service_url).connect_lazy();
+ BlobServiceClient::new(channel)
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 13, 1:17 AM (19 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5925660
Default Alt Text
D6384.1768267072.diff (865 B)
Attached To
Mode
D6384: [backup-service] Add blob client init function
Attached
Detach File
Event Timeline
Log In to Comment