@@ -14,7 +14,7 @@ pub struct Synchronizer {
1414
1515#[ derive( Debug ) ]
1616struct Inner {
17- remote_url : Url ,
17+ toggles_url : Url ,
1818 refresh_interval : Duration ,
1919 auth : HeaderValue ,
2020 #[ cfg( feature = "use_tokio" ) ]
@@ -25,15 +25,15 @@ struct Inner {
2525//TODO: graceful shutdown
2626impl Synchronizer {
2727 pub fn new (
28- remote_url : Url ,
28+ toggles_url : Url ,
2929 refresh_interval : Duration ,
3030 auth : HeaderValue ,
3131 #[ cfg( feature = "use_tokio" ) ] client : Option < Client > ,
3232 repo : Arc < RwLock < Repository > > ,
3333 ) -> Self {
3434 Self {
3535 inner : Arc :: new ( Inner {
36- remote_url ,
36+ toggles_url ,
3737 refresh_interval,
3838 auth,
3939 #[ cfg( feature = "use_tokio" ) ]
@@ -98,7 +98,7 @@ impl Inner {
9898 #[ cfg( feature = "use_tokio" ) ]
9999 async fn do_sync ( & self , client : & Client ) {
100100 let request = client
101- . request ( Method :: GET , self . remote_url . clone ( ) )
101+ . request ( Method :: GET , self . toggles_url . clone ( ) )
102102 . header ( AUTHORIZATION , self . auth . clone ( ) )
103103 . timeout ( self . refresh_interval ) ;
104104
@@ -124,7 +124,7 @@ impl Inner {
124124 #[ cfg( feature = "use_std" ) ]
125125 fn do_sync ( & self ) {
126126 //TODO: report failure
127- match ureq:: get ( self . remote_url . as_str ( ) )
127+ match ureq:: get ( self . toggles_url . as_str ( ) )
128128 . set (
129129 "authorization" ,
130130 self . auth . to_str ( ) . expect ( "already valid header value" ) ,
@@ -173,13 +173,13 @@ mod tests {
173173 }
174174
175175 fn build_synchronizer ( port : u16 ) -> Synchronizer {
176- let remote_url =
176+ let toggles_url =
177177 Url :: parse ( & format ! ( "http://127.0.0.1:{}/api/server-sdk/toggles" , port) ) . unwrap ( ) ;
178178 let refresh_interval = Duration :: from_secs ( 10 ) ;
179179 let auth = SdkAuthorization ( "sdk-key" . to_owned ( ) ) . encode ( ) ;
180180 Synchronizer {
181181 inner : Arc :: new ( Inner {
182- remote_url ,
182+ toggles_url ,
183183 refresh_interval,
184184 auth,
185185 #[ cfg( feature = "use_tokio" ) ]
0 commit comments