pub struct DynamicStorageOptionsCredentialProvider { /* private fields */ }Expand description
AWS Credential Provider that delegates to StorageOptionsAccessor
This adapter converts storage options from a StorageOptionsAccessor into
AWS-specific credentials that can be used with S3. All caching and refresh logic
is handled by the accessor.
§Future Work
TODO: Support AWS/GCP/Azure together in a unified credential provider. Currently this is AWS-specific. Needs investigation of how GCP and Azure credential refresh mechanisms work and whether they can be unified with AWS’s approach.
See: https://github.com/lance-format/lance/pull/4905#discussion_r2474605265
Implementations§
Source§impl DynamicStorageOptionsCredentialProvider
impl DynamicStorageOptionsCredentialProvider
Sourcepub fn new(accessor: Arc<StorageOptionsAccessor>) -> Self
pub fn new(accessor: Arc<StorageOptionsAccessor>) -> Self
Create a new credential provider from a storage options accessor
Sourcepub fn from_provider(provider: Arc<dyn StorageOptionsProvider>) -> Self
pub fn from_provider(provider: Arc<dyn StorageOptionsProvider>) -> Self
Create a new credential provider from a storage options provider
This is a convenience constructor for backward compatibility.
The refresh offset will be extracted from storage options using
the refresh_offset_millis key, defaulting to 60 seconds.
§Arguments
provider- The storage options provider
Sourcepub fn from_provider_with_initial(
provider: Arc<dyn StorageOptionsProvider>,
initial_options: HashMap<String, String>,
) -> Self
pub fn from_provider_with_initial( provider: Arc<dyn StorageOptionsProvider>, initial_options: HashMap<String, String>, ) -> Self
Create a new credential provider with initial credentials
This is a convenience constructor for backward compatibility.
The refresh offset will be extracted from initial_options using
the refresh_offset_millis key, defaulting to 60 seconds.
§Arguments
provider- The storage options providerinitial_options- Initial storage options to cache
Trait Implementations§
Source§impl CredentialProvider for DynamicStorageOptionsCredentialProvider
impl CredentialProvider for DynamicStorageOptionsCredentialProvider
Source§type Credential = AwsCredential
type Credential = AwsCredential
Source§fn get_credential<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ObjectStoreResult<Arc<Self::Credential>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_credential<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ObjectStoreResult<Arc<Self::Credential>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for DynamicStorageOptionsCredentialProvider
impl !RefUnwindSafe for DynamicStorageOptionsCredentialProvider
impl Send for DynamicStorageOptionsCredentialProvider
impl Sync for DynamicStorageOptionsCredentialProvider
impl Unpin for DynamicStorageOptionsCredentialProvider
impl UnsafeUnpin for DynamicStorageOptionsCredentialProvider
impl !UnwindSafe for DynamicStorageOptionsCredentialProvider
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
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>
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