1- use crate :: { ServerUrl , cli:: NetworkCommandLine } ;
1+ use crate :: cli:: NetworkCommandLine ;
22use sandpolis_core:: LayerConfig ;
33use serde:: { Deserialize , Serialize } ;
4- use tracing:: debug;
54
65#[ derive( Debug , Clone , Serialize , Deserialize , Default ) ]
76pub struct NetworkLayerConfig {
8- /// Servers to connect to.
9- ///
10- /// For GS servers, connections will be established to all given values at
11- /// the same time. For LS servers, agents, and clients, only one connection
12- /// can be maintained at a time.
13- pub servers : Option < Vec < ServerUrl > > ,
14-
157 /// Instead of maintaining a persistent connection, poll the server on this
168 /// cron expression
179 #[ cfg( not( feature = "bootagent" ) ) ]
@@ -27,20 +19,7 @@ pub struct NetworkLayerConfig {
2719}
2820
2921impl LayerConfig < NetworkCommandLine > for NetworkLayerConfig {
30- fn override_env ( & mut self ) {
31- match std:: env:: var ( "S7S_SERVER" ) {
32- Ok ( server) => {
33- debug ! ( "Overriding server address from environment" ) ;
34- todo ! ( ) ;
35- }
36- Err ( _) => todo ! ( ) ,
37- }
38- }
22+ fn override_env ( & mut self ) { }
3923
40- fn override_cli ( & mut self , args : & NetworkCommandLine ) {
41- if let Some ( servers) = & args. server {
42- debug ! ( "Overriding server address from CLI" ) ;
43- self . servers = Some ( servers. to_owned ( ) ) ;
44- }
45- }
24+ fn override_cli ( & mut self , _args : & NetworkCommandLine ) { }
4625}
0 commit comments