@@ -20,11 +20,14 @@ use clap::{App, Arg, ArgMatches};
20
20
use daemonize:: Daemonize ;
21
21
22
22
use pageserver:: {
23
- branches, http, page_service, tenant_mgr, PageServerConf , RelishStorageConfig , S3Config ,
24
- LOG_FILE_NAME ,
23
+ branches,
24
+ defaults:: { DEFAULT_HTTP_LISTEN_ADDR , DEFAULT_PG_LISTEN_ADDR } ,
25
+ http, page_service, tenant_mgr, PageServerConf , RelishStorageConfig , S3Config , LOG_FILE_NAME ,
25
26
} ;
26
27
use zenith_utils:: http:: endpoint;
27
28
29
+ use const_format:: formatcp;
30
+
28
31
/// String arguments that can be declared via CLI or config file
29
32
#[ derive( Serialize , Deserialize ) ]
30
33
struct CfgFileParams {
@@ -228,14 +231,14 @@ fn main() -> Result<()> {
228
231
. long ( "listen-pg" )
229
232
. alias ( "listen" ) // keep some compatibility
230
233
. takes_value ( true )
231
- . help ( "listen for incoming page requests on ip:port (default: 127.0.0.1:5430)" ) ,
234
+ . help ( formatcp ! ( "listen for incoming page requests on ip:port (default: {DEFAULT_PG_LISTEN_ADDR})" ) ) ,
232
235
)
233
236
. arg (
234
237
Arg :: with_name ( "listen-http" )
235
238
. long ( "listen-http" )
236
239
. alias ( "http_endpoint" ) // keep some compatibility
237
240
. takes_value ( true )
238
- . help ( "http endpoint address for metrics and management API calls ip:port (default: 127.0.0.1:5430)" ) ,
241
+ . help ( formatcp ! ( "http endpoint address for metrics and management API calls on ip:port (default: {DEFAULT_HTTP_LISTEN_ADDR})" ) ) ,
239
242
)
240
243
. arg (
241
244
Arg :: with_name ( "daemonize" )
0 commit comments