Struct consul_rs::api::Config[][src]

pub struct Config {
    pub address: Option<String>,
    pub scheme: Option<String>,
    pub datacenter: Option<String>,
    pub wait_time: Option<String>,
    pub token: Option<String>,
    pub token_file: Option<String>,
    pub namespace: Option<String>,
    pub tls_config: Option<TLSConfig>,
}
Expand description

Config is used to configure the creation of a client

Fields

address: Option<String>

Address is the address of the Consul server

scheme: Option<String>

Scheme is the URI scheme for the Consul server

datacenter: Option<String>

Datacenter to use. If not provided, the default agent datacenter is used.

wait_time: Option<String>

Transport is the Transport to use for the http client. pub Transport: surf::Client, HttpClient is the client to use. Default will be used if not provided. pub HttpClient: Optionsurf::Client, HttpAuth is the auth info to use for http access. pub HttpAuth: Option<http_types::auth::BasicAuth>, WaitTime limits how long a Watch will block. If not provided, the agent default values will be used.

token: Option<String>

Token is used to provide a per-request ACL token which overrides the agent’s default token.

token_file: Option<String>

TokenFile is a file containing the current token to use for this client. If provided it is read once at startup and never again.

namespace: Option<String>

Namespace is the name of the namespace to send along for the request when no other Namespace is present in the QueryOptions

tls_config: Option<TLSConfig>

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more