resty

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) *resty.Client

Types

type ClientOption

type ClientOption struct {
	// contains filtered or unexported fields
}

ClientOption 自定义属性

type Option

type Option func(*ClientOption)

func WithDebug

func WithDebug(debug bool) Option

func WithPropagators

func WithPropagators(propagators propagation.TextMapPropagator) Option

func WithTimeout

func WithTimeout(timeout time.Duration) Option

func WithTracer

func WithTracer(tracer trace.Tracer) Option

func WithTransport

func WithTransport(transport *http.Transport) Option

type TracerTransport

type TracerTransport struct {
	*http.Transport
	// contains filtered or unexported fields
}

TracerTransport 自定义 http-transport

func (*TracerTransport) RoundTrip

func (r *TracerTransport) RoundTrip(req *http.Request) (resp *http.Response, err error)

Jump to

Keyboard shortcuts

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