@@ -2,6 +2,7 @@ use crate::{
22 flow_definition:: Reader ,
33 flow_service:: { auth:: get_authorization_metadata, retry:: create_channel_with_retry} ,
44} ;
5+ use tokio:: time:: Duration ;
56use tonic:: { Extensions , Request , transport:: Channel } ;
67use tucana:: {
78 aquila:: { ModuleUpdateRequest , module_service_client:: ModuleServiceClient } ,
@@ -28,7 +29,13 @@ impl FlowUpdateService {
2829 ///
2930 /// This reads the definition files from the given path as modules and initializes the
3031 /// service with those module definitions.
31- pub async fn from_url ( aquila_url : String , definition_path : & str , aquila_token : String ) -> Self {
32+ pub async fn from_url (
33+ aquila_url : String ,
34+ definition_path : & str ,
35+ aquila_token : String ,
36+ connect_timeout : Duration ,
37+ request_timeout : Duration ,
38+ ) -> Self {
3239 let reader = Reader :: configure ( definition_path. to_string ( ) , true , vec ! [ ] , None ) ;
3340 let modules = match reader. read_modules ( ) {
3441 Ok ( modules) => modules,
@@ -38,7 +45,8 @@ impl FlowUpdateService {
3845 }
3946 } ;
4047
41- let channel = create_channel_with_retry ( "Aquila" , aquila_url) . await ;
48+ let channel =
49+ create_channel_with_retry ( "Aquila" , aquila_url, connect_timeout, request_timeout) . await ;
4250
4351 Self {
4452 modules,
0 commit comments