NewTransport specifies a transport that will trace Elastic and report back via OpenTracing.
(opts ...TransportOption)
| 40 | // NewTransport specifies a transport that will trace Elastic |
| 41 | // and report back via OpenTracing. |
| 42 | func NewTransport(opts ...TransportOption) *Transport { |
| 43 | t := &Transport{} |
| 44 | for _, o := range opts { |
| 45 | o(t) |
| 46 | } |
| 47 | return t |
| 48 | } |
| 49 | |
| 50 | // RoundTrip captures the request and starts an OpenTracing span |
| 51 | // for Elastic PerformRequest operation. |