@@ -27,6 +27,10 @@ use log::{debug, error, info, warn};
2727use tonic:: transport:: { Channel , Endpoint , Error as TonicTransportError } ;
2828use tonic:: { Request , Response , Status } ;
2929
30+ /// Type alias for the endpoint override function used in gRPC client configuration
31+ pub type EndpointOverrideFn =
32+ Arc < dyn Fn ( Endpoint ) -> Result < Endpoint , TonicTransportError > + Send + Sync > ;
33+
3034use ballista_core:: error:: BallistaError ;
3135use ballista_core:: serde:: protobuf:: {
3236 executor_grpc_server:: { ExecutorGrpc , ExecutorGrpcServer } ,
@@ -184,9 +188,7 @@ pub struct ExecutorServer<T: 'static + AsLogicalPlan, U: 'static + AsExecutionPl
184188 schedulers : SchedulerClients ,
185189 grpc_max_encoding_message_size : usize ,
186190 grpc_max_decoding_message_size : usize ,
187- override_create_grpc_client_endpoint : Option <
188- Arc < dyn Fn ( Endpoint ) -> Result < Endpoint , TonicTransportError > + Send + Sync > ,
189- > ,
191+ override_create_grpc_client_endpoint : Option < EndpointOverrideFn > ,
190192}
191193
192194#[ derive( Clone ) ]
@@ -213,9 +215,7 @@ impl<T: 'static + AsLogicalPlan, U: 'static + AsExecutionPlan> ExecutorServer<T,
213215 codec : BallistaCodec < T , U > ,
214216 grpc_max_encoding_message_size : usize ,
215217 grpc_max_decoding_message_size : usize ,
216- override_create_grpc_client_endpoint : Option <
217- Arc < dyn Fn ( Endpoint ) -> Result < Endpoint , TonicTransportError > + Send + Sync > ,
218- > ,
218+ override_create_grpc_client_endpoint : Option < EndpointOverrideFn > ,
219219 ) -> Self {
220220 Self {
221221 _start_time : SystemTime :: now ( )
0 commit comments