Open
Description
Describe the issue
I've made good attempts to understand how Timestream's ReloadEndpoint works, which doesn't seem to documented well. It still doesn't make sense to me, unfortunately.
The docs.rs of ReloadEndpoint
only says "Endpoint reloader."
Here's roughly our code:
let config = aws_config::defaults(aws_config::BehaviorVersion::latest())
.region(REGION)
.load()
.await;
let (client, reload) = aws_sdk_timestreamwrite::Client::new(&config)
.with_endpoint_discovery_enabled()
.await
.unwrap();
// This task will terminate when the corresponding Client is dropped.
tokio::task::spawn(reload.reload_task());
... work with the client here.
My questions are:
- What function does the
ReloadEndpoint
have? - Why do we need to call
.with_endpoint_discovery_enabled()
? It will not work without this. - It seems to work without me spawning the reload task - What does that task really do then?
Links
aws-sdk-rust/sdk/timestreamwrite/src/client.rs
Lines 18 to 23 in 29883b1