Skip to content

Timestream's ReloadEndpoint is unclear #1124

Open
@simbleau

Description

@simbleau

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

/// Enable endpoint discovery for this client
///
/// This method MUST be called to construct a working client.
pub async fn with_endpoint_discovery_enabled(
self,
) -> ::std::result::Result<(Self, crate::endpoint_discovery::ReloadEndpoint), ::aws_smithy_runtime_api::box_error::BoxError> {

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationThis is a problem with documentationp2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions