pub struct UdfServiceConnection {
pub service_id: String,
pub transport: Transport,
/* private fields */
}Expand description
A pooled connection to a remote UDF service, shared across its functions.
Fields§
§service_id: String§transport: TransportImplementations§
Source§impl UdfServiceConnection
impl UdfServiceConnection
Sourcepub async fn new(
service_id: String,
transport: Transport,
connect_timeout: Duration,
) -> Result<Self, TransportError>
pub async fn new( service_id: String, transport: Transport, connect_timeout: Duration, ) -> Result<Self, TransportError>
Connect to a remote UDF service (fail-fast at startup).
§Errors
Returns a TransportError if the connection or handshake fails.
Sourcepub async fn do_exchange(
&self,
function_name: &str,
input: RecordBatch,
max_response_bytes: usize,
) -> Result<Vec<RecordBatch>, RemoteError>
pub async fn do_exchange( &self, function_name: &str, input: RecordBatch, max_response_bytes: usize, ) -> Result<Vec<RecordBatch>, RemoteError>
Call DoExchange for function_name, sending input and collecting the
response batches under a streaming byte ceiling.
The byte ceiling is checked incrementally: as soon as the cumulative
response size exceeds max_response_bytes the call fails with
ValidationError::ResponseTooLarge, before the remaining batches are
read — an oversized worker cannot force the whole response into memory.
Input/output batches are arrow-59 (arrow-flight’s arrow); callers bridge
to/from DataFusion’s arrow-58 batches.
§Errors
Returns a RemoteError on transport failure or when the response
exceeds the byte ceiling.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UdfServiceConnection
impl !RefUnwindSafe for UdfServiceConnection
impl Send for UdfServiceConnection
impl Sync for UdfServiceConnection
impl Unpin for UdfServiceConnection
impl !UnwindSafe for UdfServiceConnection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].