File tree Expand file tree Collapse file tree
crates/openshell-server/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -278,14 +278,14 @@ struct Args {
278278 oidc_scopes_claim : String ,
279279
280280 /// Unix domain socket path to an external compute driver.
281- /// Use with `--driver external` to delegate ComputeDriver RPCs to a
281+ /// Use with `--driver external` to delegate ` ComputeDriver` RPCs to a
282282 /// pre-existing out-of-process driver (e.g. a sidecar container).
283283 #[ arg( long, env = "OPENSHELL_COMPUTE_DRIVER_SOCKET" ) ]
284284 compute_driver_socket : Option < PathBuf > ,
285285
286286 /// Unix domain socket path to a credentials driver.
287287 /// When set, the gateway delegates credential resolution to this
288- /// out-of-process driver via the CredentialsDriver gRPC contract.
288+ /// out-of-process driver via the ` CredentialsDriver` gRPC contract.
289289 #[ arg( long, env = "OPENSHELL_CREDENTIALS_DRIVER_SOCKET" ) ]
290290 credentials_driver_socket : Option < PathBuf > ,
291291}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ use tower::service_fn;
2424///
2525/// Retries for up to 10 seconds to allow the sidecar time to start.
2626#[ cfg( unix) ]
27- pub ( crate ) async fn connect ( socket_path : & std:: path:: Path ) -> Result < Channel > {
27+ pub async fn connect ( socket_path : & std:: path:: Path ) -> Result < Channel > {
2828 let mut last_error: Option < String > = None ;
2929 for _ in 0 ..100 {
3030 match connect_once ( socket_path) . await {
Original file line number Diff line number Diff line change 33
44//! Gateway-owned compute orchestration over a pluggable compute backend.
55
6- pub ( crate ) mod external;
6+ pub mod external;
77pub mod vm;
88
99pub use openshell_driver_docker:: DockerComputeConfig ;
Original file line number Diff line number Diff line change @@ -52,8 +52,7 @@ impl CredentialsDriverHandle {
5252 . await
5353 . map_err ( |s| {
5454 Error :: execution ( format ! (
55- "credentials driver ResolveCredential failed for '{}': {}" ,
56- name, s
55+ "credentials driver ResolveCredential failed for '{name}': {s}"
5756 ) )
5857 } ) ?;
5958 Ok ( response. into_inner ( ) )
@@ -66,7 +65,7 @@ impl CredentialsDriverHandle {
6665 . list_credentials ( tonic:: Request :: new ( ListCredentialsRequest { } ) )
6766 . await
6867 . map_err ( |s| {
69- Error :: execution ( format ! ( "credentials driver ListCredentials failed: {}" , s ) )
68+ Error :: execution ( format ! ( "credentials driver ListCredentials failed: {s}" ) )
7069 } ) ?;
7170 Ok ( response. into_inner ( ) )
7271 }
Original file line number Diff line number Diff line change @@ -207,12 +207,12 @@ pub async fn run_server(
207207 )
208208 . await ?;
209209
210- let credentials_driver = if !config. credentials_driver_socket . is_empty ( ) {
210+ let credentials_driver = if config. credentials_driver_socket . is_empty ( ) {
211+ None
212+ } else {
211213 let socket_path = std:: path:: Path :: new ( & config. credentials_driver_socket ) ;
212214 let handle = credentials:: CredentialsDriverHandle :: connect ( socket_path) . await ?;
213215 Some ( Arc :: new ( handle) )
214- } else {
215- None
216216 } ;
217217
218218 let state = Arc :: new ( ServerState :: new (
You can’t perform that action at this time.
0 commit comments