Struct dynamo_subscriber::client::Client
source · pub struct Client { /* private fields */ }Expand description
Client for both Amazon DynamoDB and Amazon DynamoDB Streams.
A [SdkConfig] is required to construct a client.
You can select any ways to get [SdkConfig] and pass it
to a client.
For example, if you want to subscribe dynamodb streams from your dynamodb-local
running on localhost:8000, set endpoint_url to your [SdkConfig].
use dynamo_subscriber::Client;
let config = aws_config::load_from_env()
.await
.into_builder()
.endpoint_url("http://localhost:8000")
.build();
let client = Client::new(&config);See the aws-config docs for more information on customizing configuration.
Implementations§
Trait Implementations§
source§impl DynamodbClient for Client
impl DynamodbClient for Client
source§fn get_stream_arn<'life0, 'async_trait>(
&'life0 self,
table_name: impl 'async_trait + Into<String> + Send
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_stream_arn<'life0, 'async_trait>( &'life0 self, table_name: impl 'async_trait + Into<String> + Send ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Return DynamoDB Stream Arn from DynamoDB
TableDescription.source§fn get_shards<'life0, 'async_trait>(
&'life0 self,
stream_arn: impl 'async_trait + Into<String> + Send,
exclusive_start_shard_id: Option<String>
) -> Pin<Box<dyn Future<Output = Result<GetShardsOutput, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_shards<'life0, 'async_trait>( &'life0 self, stream_arn: impl 'async_trait + Into<String> + Send, exclusive_start_shard_id: Option<String> ) -> Pin<Box<dyn Future<Output = Result<GetShardsOutput, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Return a vector of
Shard and shard id for next iteration.source§fn get_shard_with_iterator<'life0, 'async_trait>(
&'life0 self,
stream_arn: impl 'async_trait + Into<String> + Send,
shard: Shard,
shard_iterator_type: ShardIteratorType
) -> Pin<Box<dyn Future<Output = Result<Shard, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_shard_with_iterator<'life0, 'async_trait>( &'life0 self, stream_arn: impl 'async_trait + Into<String> + Send, shard: Shard, shard_iterator_type: ShardIteratorType ) -> Pin<Box<dyn Future<Output = Result<Shard, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Return a
Shard that is the shard passed as an argument with shard
iterator id.Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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
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>
Creates a shared type from an unshared type.