Struct nakadion::api::ConfigBuilder[][src]

pub struct ConfigBuilder {
    pub nakadi_host: Option<String>,
    pub request_timeout: Option<Duration>,
}

Fields

The Nakadi host

The request timeout when connecting to Nakadi

Methods

impl ConfigBuilder
[src]

The URI prefix for the Nakadi Host, e.g. "https://my.nakadi.com"

Timeout after which a conection to the REST API is aborted. If None wait indefinitely

Create a builder from environment variables.

Environment Variables:

For variables not found except 'NAKADION_NAKADI_HOST' a default will be set.

Variables:

  • NAKADION_NAKADI_HOST: Host address of Nakadi. The host is mandatory.
  • NAKADION_REQUEST_TIMEOUT_MS: Timeout in ms after which a conection to the REST API is aborted. This is optional and defaults to 1 second.

Errors

Fails if a value can not be parsed from an existing environment variable.

Build a config from this builder.

Errors

Fails if nakadi_host is not set.

Directly build an API client from this builder.

Takes ownership of the token_provider

Errors

Fails if this builder is in an invalid state.

Directly build an API client builder.

The token_provider can be a shared token provider.

Errors

Fails if this builder is in an invalid state.

Trait Implementations

impl Default for ConfigBuilder
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations