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

Use http.RoundTripper in place of *http.Transport #205

Merged
merged 1 commit into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type ClientOptions struct {
HTTPClient *http.Client
// An optional pointer to `http.Transport` that will be used with a default HTTPTransport.
// Using your own transport will make HTTPProxy, HTTPSProxy and CaCerts options ignored.
HTTPTransport *http.Transport
HTTPTransport http.RoundTripper
// An optional HTTP proxy to use.
// This will default to the `http_proxy` environment variable.
// or `https_proxy` if that one exists.
Expand Down
4 changes: 2 additions & 2 deletions transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ type batch struct {
type HTTPTransport struct {
dsn *Dsn
client *http.Client
transport *http.Transport
transport http.RoundTripper

// buffer is a channel of batches. Calling Flush terminates work on the
// current in-flight items and starts a new batch for subsequent events.
Expand Down Expand Up @@ -336,7 +336,7 @@ func (t *HTTPTransport) worker() {
type HTTPSyncTransport struct {
dsn *Dsn
client *http.Client
transport *http.Transport
transport http.RoundTripper
disabledUntil time.Time

// HTTP Client request timeout. Defaults to 30 seconds.
Expand Down