pub struct UnityFactoryProxyBackend { /* private fields */ }Available on crate feature
client-arm only.Expand description
A StorageProxyBackend that resolves + vends through a
UnityObjectStoreFactory. Portable against any UC server.
Implementations§
Source§impl UnityFactoryProxyBackend
impl UnityFactoryProxyBackend
Sourcepub async fn connect(
base_uri: impl Into<String>,
token: Option<String>,
) -> ProxyResult<Self>
pub async fn connect( base_uri: impl Into<String>, token: Option<String>, ) -> ProxyResult<Self>
Connect to a Unity Catalog server at base_uri (e.g.
https://host/api/2.1/unity-catalog/) with an optional bearer token.
Forwards a per-request end-user identity to upstream UC under
DEFAULT_FORWARDED_USER_HEADER. Use
connect_with_forwarded_header to
re-emit the identity under a different header name.
Sourcepub async fn connect_with_forwarded_header(
base_uri: impl Into<String>,
token: Option<String>,
forwarded_header: impl Into<String>,
) -> ProxyResult<Self>
pub async fn connect_with_forwarded_header( base_uri: impl Into<String>, token: Option<String>, forwarded_header: impl Into<String>, ) -> ProxyResult<Self>
Like connect, but re-emits the forwarded end-user
identity under forwarded_header on upstream UC requests (typically the
same header name the proxy read the incoming identity from).
Sourcepub fn from_factory(factory: UnityObjectStoreFactory) -> Self
pub fn from_factory(factory: UnityObjectStoreFactory) -> Self
Build from an already-constructed factory (e.g. one sharing a client pool).
Forwards identity under DEFAULT_FORWARDED_USER_HEADER.
Trait Implementations§
Source§impl Clone for UnityFactoryProxyBackend
impl Clone for UnityFactoryProxyBackend
Source§fn clone(&self) -> UnityFactoryProxyBackend
fn clone(&self) -> UnityFactoryProxyBackend
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Cx: ForwardedUser + Send + Sync + 'static> StorageProxyBackend<Cx> for UnityFactoryProxyBackend
impl<Cx: ForwardedUser + Send + Sync + 'static> StorageProxyBackend<Cx> for UnityFactoryProxyBackend
Source§fn capabilities(&self) -> ProxyCapabilities
fn capabilities(&self) -> ProxyCapabilities
Available on crate feature
server only.The proxy capabilities this backend advertises.
Available on crate feature
server only.Source§fn open<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 ProxyReq,
cx: &'life2 Cx,
) -> Pin<Box<dyn Future<Output = ProxyResult<Arc<DynObjectStore>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn open<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 ProxyReq,
cx: &'life2 Cx,
) -> Pin<Box<dyn Future<Output = ProxyResult<Arc<DynObjectStore>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Available on crate feature
server only.Open a store scoped to
req.securable at the access level implied by the
verb (Get/Head → read, Put → read-write). The returned store is
prefixed at the securable root, so req.key addresses relative to it. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for UnityFactoryProxyBackend
impl !UnwindSafe for UnityFactoryProxyBackend
impl Freeze for UnityFactoryProxyBackend
impl Send for UnityFactoryProxyBackend
impl Sync for UnityFactoryProxyBackend
impl Unpin for UnityFactoryProxyBackend
impl UnsafeUnpin for UnityFactoryProxyBackend
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<B, Cx> StorageProxyHandler<Cx> for Bwhere
B: StorageProxyBackend<Cx>,
Cx: Send + 'static,
impl<B, Cx> StorageProxyHandler<Cx> for Bwhere
B: StorageProxyBackend<Cx>,
Cx: Send + 'static,
Source§fn get<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
cx: Cx,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, ProxyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
B: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
cx: Cx,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, ProxyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
B: 'async_trait,
Available on crate feature
server only.Serve a (optionally ranged) body read.
Source§fn head<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
cx: Cx,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, ProxyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
B: 'async_trait,
fn head<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
cx: Cx,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, ProxyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
B: 'async_trait,
Available on crate feature
server only.Serve a metadata-only read.
Source§fn put<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
body: Body,
cx: Cx,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, ProxyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
B: 'async_trait,
fn put<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
body: Body,
cx: Cx,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, ProxyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
B: 'async_trait,
Available on crate feature
server only.Serve a whole-object write, consuming the request
body.