Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: allow configuring http client #5275

Merged
merged 2 commits into from
May 20, 2019
Merged

api: allow configuring http client #5275

merged 2 commits into from
May 20, 2019

Commits on May 17, 2019

  1. api: allow configuring http client

    Allow clients to configure httpClient, e.g. set a pooled/keep-alive
    client.
    
    When caller configures HttpClient explicitly, we aim to use as-is; e.g.
    we assume it's configured with TLS already.  Expose `ConfigureTLS` to
    aid api consumers with configuring their http client.
    
    Also, removes `SetTimeout` call that I believe is internal only and has
    odd side-effects when called on already created config.  Also deprecates
    `config.ConfigureTLS` in preference to the new `ConfigureTLS`.
    Mahmood Ali committed May 17, 2019
    Configuration menu
    Copy the full SHA
    cbc1555 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2019

  1. remove "incidentally" exported internal function

    `*Config.ConfigureTLS()` is invoked internally by `NewClient` and API
    consumers should not invoke directly.
    
    Now that http client is created in `api.NewClient`,
    `*Config.ConfigureTLS` makes no sense.  API consumers that call it
    explicitly can remove the invocation and preserve the behavior.
    Mahmood Ali committed May 20, 2019
    Configuration menu
    Copy the full SHA
    10ab705 View commit details
    Browse the repository at this point in the history