@@ -24,44 +24,132 @@ fn cmd_config_show() {
24
24
let mut table_general = table ! (
25
25
[ "host" , & format!( "{}" , cfg. general. host. to_string( ) ) ] ,
26
26
[ "port" , & format!( "{}" , cfg. general. port. to_string( ) ) ] ,
27
-
28
- [ "connect_timeout" , & format!( "{}" , cfg. general. connect_timeout. to_string( ) ) ] ,
29
- [ "idle_timeout" , & format!( "{}" , cfg. general. idle_timeout. to_string( ) ) ] ,
30
- [ "idle_client_in_transaction_timeout" , & format!( "{}" , cfg. general. idle_client_in_transaction_timeout. to_string( ) ) ] ,
31
- [ "shutdown_timeout" , & format!( "{}" , cfg. general. shutdown_timeout. to_string( ) ) ] ,
32
- [ "tcp_user_timeout" , & format!( "{}" , cfg. general. tcp_user_timeout. to_string( ) ) ] ,
33
-
34
- [ "admin_username" , & format!( "{}" , cfg. general. admin_username. to_string( ) ) ] ,
35
-
36
- [ "tcp_keepalives_idle" , & format!( "{}" , cfg. general. tcp_keepalives_idle. to_string( ) ) ] ,
37
- [ "tcp_keepalives_count" , & format!( "{}" , cfg. general. tcp_keepalives_count. to_string( ) ) ] ,
38
- [ "tcp_keepalives_interval" , & format!( "{}" , cfg. general. tcp_keepalives_interval. to_string( ) ) ] ,
39
- [ "dns_cache_enabled" , & format!( "{}" , cfg. general. dns_cache_enabled. to_string( ) ) ] ,
40
- [ "dns_max_ttl" , & format!( "{}" , cfg. general. dns_max_ttl. to_string( ) ) ] ,
41
-
42
- [ "log_client_connections" , & format!( "{}" , cfg. general. log_client_connections. to_string( ) ) ] ,
43
- [ "log_client_disconnections" , & format!( "{}" , cfg. general. log_client_disconnections. to_string( ) ) ] ,
44
-
45
- [ "healthcheck_timeout" , & format!( "{}" , cfg. general. healthcheck_timeout. to_string( ) ) ] ,
46
- [ "healthcheck_delay" , & format!( "{}" , cfg. general. healthcheck_delay. to_string( ) ) ] ,
27
+ [
28
+ "connect_timeout" ,
29
+ & format!( "{}" , cfg. general. connect_timeout. to_string( ) )
30
+ ] ,
31
+ [
32
+ "idle_timeout" ,
33
+ & format!( "{}" , cfg. general. idle_timeout. to_string( ) )
34
+ ] ,
35
+ [
36
+ "idle_client_in_transaction_timeout" ,
37
+ & format!(
38
+ "{}" ,
39
+ cfg. general. idle_client_in_transaction_timeout. to_string( )
40
+ )
41
+ ] ,
42
+ [
43
+ "shutdown_timeout" ,
44
+ & format!( "{}" , cfg. general. shutdown_timeout. to_string( ) )
45
+ ] ,
46
+ [
47
+ "tcp_user_timeout" ,
48
+ & format!( "{}" , cfg. general. tcp_user_timeout. to_string( ) )
49
+ ] ,
50
+ [
51
+ "admin_username" ,
52
+ & format!( "{}" , cfg. general. admin_username. to_string( ) )
53
+ ] ,
54
+ [
55
+ "tcp_keepalives_idle" ,
56
+ & format!( "{}" , cfg. general. tcp_keepalives_idle. to_string( ) )
57
+ ] ,
58
+ [
59
+ "tcp_keepalives_count" ,
60
+ & format!( "{}" , cfg. general. tcp_keepalives_count. to_string( ) )
61
+ ] ,
62
+ [
63
+ "tcp_keepalives_interval" ,
64
+ & format!( "{}" , cfg. general. tcp_keepalives_interval. to_string( ) )
65
+ ] ,
66
+ [
67
+ "dns_cache_enabled" ,
68
+ & format!( "{}" , cfg. general. dns_cache_enabled. to_string( ) )
69
+ ] ,
70
+ [
71
+ "dns_max_ttl" ,
72
+ & format!( "{}" , cfg. general. dns_max_ttl. to_string( ) )
73
+ ] ,
74
+ [
75
+ "log_client_connections" ,
76
+ & format!( "{}" , cfg. general. log_client_connections. to_string( ) )
77
+ ] ,
78
+ [
79
+ "log_client_disconnections" ,
80
+ & format!( "{}" , cfg. general. log_client_disconnections. to_string( ) )
81
+ ] ,
82
+ [
83
+ "healthcheck_timeout" ,
84
+ & format!( "{}" , cfg. general. healthcheck_timeout. to_string( ) )
85
+ ] ,
86
+ [
87
+ "healthcheck_delay" ,
88
+ & format!( "{}" , cfg. general. healthcheck_delay. to_string( ) )
89
+ ] ,
47
90
[ "ban_time" , & format!( "{}" , cfg. general. ban_time. to_string( ) ) ] ,
48
- [ "server_lifetime" , & format!( "{}" , cfg. general. server_lifetime. to_string( ) ) ] ,
49
- [ "server_round_robin" , & format!( "{}" , cfg. general. server_round_robin. to_string( ) ) ] ,
50
- [ "worker_threads" , & format!( "{}" , cfg. general. worker_threads. to_string( ) ) ] ,
51
- [ "autoreload" , & format!( "{}" , cfg. general. autoreload. unwrap_or_default( ) ) ] ,
52
-
53
- [ "tls_certificate" , & format!( "{}" , cfg. general. tls_certificate. unwrap_or( "" . to_string( ) ) ) ] ,
54
- [ "tls_private_key" , & format!( "{}" , cfg. general. tls_private_key. unwrap_or( "" . to_string( ) ) ) ] ,
55
- [ "server_tls" , & format!( "{}" , cfg. general. server_tls. to_string( ) ) ] ,
56
- [ "verify_server_certificate" , & format!( "{}" , cfg. general. verify_server_certificate. to_string( ) ) ] ,
57
-
58
- [ "auth_query" , & format!( "{}" , cfg. general. auth_query. unwrap_or( "" . to_string( ) ) ) ] ,
59
- [ "auth_query_user" , & format!( "{}" , cfg. general. auth_query_user. unwrap_or( "" . to_string( ) ) ) ] ,
60
- [ "auth_query_password" , & format!( "{}" , cfg. general. auth_query_password. unwrap_or( "" . to_string( ) ) ) ] ,
61
-
62
- [ "enable_prometheus_exporter" , & format!( "{}" , cfg. general. enable_prometheus_exporter. unwrap_or( false ) ) ] ,
63
- [ "prometheus_exporter_port" , & format!( "{}" , cfg. general. prometheus_exporter_port. to_string( ) ) ] ,
64
- [ "validate_config" , & format!( "{}" , cfg. general. validate_config. to_string( ) ) ]
91
+ [
92
+ "server_lifetime" ,
93
+ & format!( "{}" , cfg. general. server_lifetime. to_string( ) )
94
+ ] ,
95
+ [
96
+ "server_round_robin" ,
97
+ & format!( "{}" , cfg. general. server_round_robin. to_string( ) )
98
+ ] ,
99
+ [
100
+ "worker_threads" ,
101
+ & format!( "{}" , cfg. general. worker_threads. to_string( ) )
102
+ ] ,
103
+ [
104
+ "autoreload" ,
105
+ & format!( "{}" , cfg. general. autoreload. unwrap_or_default( ) )
106
+ ] ,
107
+ [
108
+ "tls_certificate" ,
109
+ & format!( "{}" , cfg. general. tls_certificate. unwrap_or( "" . to_string( ) ) )
110
+ ] ,
111
+ [
112
+ "tls_private_key" ,
113
+ & format!( "{}" , cfg. general. tls_private_key. unwrap_or( "" . to_string( ) ) )
114
+ ] ,
115
+ [
116
+ "server_tls" ,
117
+ & format!( "{}" , cfg. general. server_tls. to_string( ) )
118
+ ] ,
119
+ [
120
+ "verify_server_certificate" ,
121
+ & format!( "{}" , cfg. general. verify_server_certificate. to_string( ) )
122
+ ] ,
123
+ [
124
+ "auth_query" ,
125
+ & format!( "{}" , cfg. general. auth_query. unwrap_or( "" . to_string( ) ) )
126
+ ] ,
127
+ [
128
+ "auth_query_user" ,
129
+ & format!( "{}" , cfg. general. auth_query_user. unwrap_or( "" . to_string( ) ) )
130
+ ] ,
131
+ [
132
+ "auth_query_password" ,
133
+ & format!(
134
+ "{}" ,
135
+ cfg. general. auth_query_password. unwrap_or( "" . to_string( ) )
136
+ )
137
+ ] ,
138
+ [
139
+ "enable_prometheus_exporter" ,
140
+ & format!(
141
+ "{}" ,
142
+ cfg. general. enable_prometheus_exporter. unwrap_or( false )
143
+ )
144
+ ] ,
145
+ [
146
+ "prometheus_exporter_port" ,
147
+ & format!( "{}" , cfg. general. prometheus_exporter_port. to_string( ) )
148
+ ] ,
149
+ [
150
+ "validate_config" ,
151
+ & format!( "{}" , cfg. general. validate_config. to_string( ) )
152
+ ]
65
153
) ;
66
154
67
155
table_general. set_titles ( row ! [ "Setting" , "Value" ] ) ;
0 commit comments