Documentation ¶
Index ¶
- func Handler(tracer trace.Tracer, options ...Option) func(next http.Handler) http.Handler
- type Client
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) Get(ctx context.Context, uri string) (*http.Response, error)
- func (c *Client) Post(ctx context.Context, uri, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) PostForm(ctx context.Context, uri string, data url.Values) (*http.Response, error)
- type Middleware
- type Option
- type Options
- type StatusCodeTracker
- type Transport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
func NewMiddleware ¶
func NewMiddleware(tracer trace.Tracer, options ...Option) *Middleware
func (*Middleware) Middleware ¶
func (m *Middleware) Middleware(next http.Handler) http.Handler
type StatusCodeTracker ¶
type StatusCodeTracker struct { http.ResponseWriter // contains filtered or unexported fields }
func NewStatusCodeTracker ¶
func NewStatusCodeTracker(w http.ResponseWriter) *StatusCodeTracker
func (*StatusCodeTracker) WriteHeader ¶
func (w *StatusCodeTracker) WriteHeader(status int)
func (*StatusCodeTracker) Writer ¶ added in v0.13.1
func (w *StatusCodeTracker) Writer() http.ResponseWriter
Writer returns a wrapped version of the original ResponseWriter and only implements the same combination of additional interfaces as the original. This implementation is based on https://github.com/felixge/httpsnoop.
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
func NewTransport ¶
func NewTransport(tracer trace.Tracer, roundTripper http.RoundTripper) *Transport
Click to show internal directories.
Click to hide internal directories.