1- use std:: time:: Duration ;
2-
31use amzn_codewhisperer_streaming_client:: Client as CodewhispererStreamingClient ;
42use amzn_qdeveloper_streaming_client:: Client as QDeveloperStreamingClient ;
5- use aws_config:: timeout:: TimeoutConfig ;
63use aws_types:: request_id:: RequestId ;
7- use aws_types:: sdk_config:: StalledStreamProtectionConfig ;
84use fig_auth:: builder_id:: BearerResolver ;
95use fig_aws_common:: {
106 UserAgentOverrideInterceptor ,
@@ -14,6 +10,7 @@ use fig_aws_common::{
1410use super :: shared:: {
1511 bearer_sdk_config,
1612 sigv4_sdk_config,
13+ stalled_stream_protection_config,
1714} ;
1815use crate :: interceptor:: opt_out:: OptOutInterceptor ;
1916use crate :: model:: {
@@ -25,21 +22,6 @@ use crate::{
2522 Error ,
2623} ;
2724
28- fn stalled_stream_protection_config ( ) -> StalledStreamProtectionConfig {
29- StalledStreamProtectionConfig :: enabled ( )
30- . grace_period ( Duration :: from_secs ( 100 ) )
31- . build ( )
32- }
33-
34- fn timeout_config ( ) -> TimeoutConfig {
35- TimeoutConfig :: builder ( )
36- . read_timeout ( Duration :: from_secs ( 10 ) )
37- . operation_timeout ( Duration :: from_secs ( 10 ) )
38- . operation_attempt_timeout ( Duration :: from_secs ( 10 ) )
39- . connect_timeout ( Duration :: from_secs ( 10 ) )
40- . build ( )
41- }
42-
4325mod inner {
4426 use amzn_codewhisperer_streaming_client:: Client as CodewhispererStreamingClient ;
4527 use amzn_qdeveloper_streaming_client:: Client as QDeveloperStreamingClient ;
@@ -81,7 +63,6 @@ impl StreamingClient {
8163 . app_name ( app_name ( ) )
8264 . endpoint_url ( endpoint. url ( ) )
8365 . stalled_stream_protection ( stalled_stream_protection_config ( ) )
84- . timeout_config ( timeout_config ( ) )
8566 . build ( ) ;
8667 let client = CodewhispererStreamingClient :: from_conf ( conf) ;
8768 Self ( inner:: Inner :: Codewhisperer ( client) )
@@ -96,7 +77,6 @@ impl StreamingClient {
9677 . app_name ( app_name ( ) )
9778 . endpoint_url ( endpoint. url ( ) )
9879 . stalled_stream_protection ( stalled_stream_protection_config ( ) )
99- . timeout_config ( timeout_config ( ) )
10080 . build ( ) ;
10181 let client = QDeveloperStreamingClient :: from_conf ( conf) ;
10282 Ok ( Self ( inner:: Inner :: QDeveloper ( client) ) )
0 commit comments