tracing

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2019 License: MIT Imports: 5 Imported by: 0

README

Tracing

A simple HTTP middleware for Go to trace outgoing and incoming requests. It provides handler functions for use with "net/http" or "github.com/urfave/negroni" and also wrappers around http.Client's functions to perfrom outgoing traced requests.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(c *http.Client, req *http.Request) (*http.Response, error)

Do performs a traced http.Client.Do()

func Get

func Get(c *http.Client, url string) (*http.Response, error)

Get performs a traced http.Client.Get()

func Handler

func Handler(h http.Handler, name string) http.Handler

Handler for integration with net/http.

func HandlerFuncWithNext

func HandlerFuncWithNext(w http.ResponseWriter, r *http.Request, next http.HandlerFunc, name string)

HandlerFuncWithNext for integration with github.com/urfave/negroni.

func Head(c *http.Client, url string) (*http.Response, error)

Head performs a traced http.Client.Head()

func Post

func Post(c *http.Client, url string, contentType string, body io.Reader) (resp *http.Response, err error)

Post performs a traced http.Client.Post()

func PostForm

func PostForm(c *http.Client, url string, data url.Values) (resp *http.Response, err error)

PostForm performs a traced http.Client.PostForm()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL