http

package
v0.0.0-...-619e77c Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(handler http.Handler, spanName string) http.Handler

func NewInterceptor

func NewInterceptor(
	spanName string,

) func(http.Handler) http.Handler

Types

type HttpClient

type HttpClient struct {
	Opts *Opts
	// contains filtered or unexported fields
}

func New

func New(
	optFuncs ...OptFunc,
) *HttpClient

func (*HttpClient) Do

func (c *HttpClient) Do(
	ctx context.Context,
	req *http.Request,
	spanName string,
) (
	*http.Response,
	error,
)

type OptFunc

type OptFunc func(*Opts)

func WithTimeout

func WithTimeout(timeout time.Duration) OptFunc

Configure timeout of the HTTP client

type Opts

type Opts struct {
	Timeout time.Duration
}

Jump to

Keyboard shortcuts

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