File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ tar = "0.4.41"
9595aws-config = " 1"
9696aws-sdk-s3 = " 1"
9797aws-smithy-runtime = " 1.6.2"
98+ dialoguer = { version = " 0.11.0" , features = [" history" ] }
9899
99100[dev-dependencies ]
100101arbitrary = { version = " 1.3.0" , features = [" derive_arbitrary" ] }
Original file line number Diff line number Diff line change 1+ use std:: fmt:: Display ;
2+ use std:: pin:: Pin ;
3+
4+ use bytes:: Bytes ;
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ use crate::net::Connector;
3131use crate :: LIBSQL_PAGE_SIZE ;
3232
3333pub mod stats;
34- mod admin_shell;
3534
3635#[ derive( Clone ) ]
3736struct Metrics {
@@ -169,7 +168,7 @@ where
169168 . route ( "/profile/heap/disable/:id" , post ( disable_profile_heap) )
170169 . route ( "/profile/heap/:id" , delete ( delete_profile_heap) )
171170 . with_state ( Arc :: new ( AppState {
172- namespaces,
171+ namespaces : namespaces . clone ( ) ,
173172 connector,
174173 user_http_server,
175174 metrics,
@@ -185,6 +184,14 @@ where
185184 )
186185 . layer ( axum:: middleware:: from_fn_with_state ( auth, auth_middleware) ) ;
187186
187+ let admin_shell = crate :: admin_shell:: make_svc ( namespaces. clone ( ) ) ;
188+ let grpc_router = tonic:: transport:: Server :: builder ( )
189+ . accept_http1 ( true )
190+ . add_service ( tonic_web:: enable ( admin_shell) )
191+ . into_router ( ) ;
192+
193+ let router = router. merge ( grpc_router) ;
194+
188195 hyper:: server:: Server :: builder ( acceptor)
189196 . serve ( router. into_make_service ( ) )
190197 . with_graceful_shutdown ( shutdown. notified ( ) )
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ use self::net::AddrIncoming;
8484use self :: replication:: script_backup_manager:: { CommandHandler , ScriptBackupManager } ;
8585use self :: schema:: SchedulerHandle ;
8686
87+ pub mod admin_shell;
8788pub mod auth;
8889mod broadcaster;
8990pub mod config;
You can’t perform that action at this time.
0 commit comments