gotelhttp

package
v0.0.0-...-7e846e6 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

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

func Handle

func Handle(pattern string, handler http.Handler, mux ...*http.ServeMux)

func HandleFunc

func HandleFunc(pattern string, handlerFunc http.HandlerFunc, mux ...*http.ServeMux)

func InstrumentDefaultClient

func InstrumentDefaultClient()

func NewClient

func NewClient() http.Client

func NewHandler

func NewHandler(handler http.Handler) http.Handler

NewHandler wraps a http.Handler with OpenTelemetry instrumentation. The span name is set to the HTTP method only as no route is available.

func NewRequest

func NewRequest(ctx context.Context, method, url string, body io.Reader) (*http.Request, error)

Types

type ServeMux

type ServeMux struct {
	*http.ServeMux
}

func NewServeMux

func NewServeMux() *ServeMux

func (*ServeMux) Handle

func (mux *ServeMux) Handle(pattern string, handler http.Handler)

func (*ServeMux) HandleFunc

func (mux *ServeMux) HandleFunc(pattern string, handlerFunc http.HandlerFunc)

Jump to

Keyboard shortcuts

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