http

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Do(ctx context.Context, req *http.Request) (*http.Response, error)
}

Client interface of a HTTP client.

type OptionFunc added in v0.23.0

type OptionFunc func(*TracedClient) error

OptionFunc definition for configuring the client in a functional way.

func CircuitBreaker added in v0.23.0

func CircuitBreaker(name string, set circuitbreaker.Setting) OptionFunc

CircuitBreaker option for setting up a circuit breaker.

func Timeout added in v0.23.0

func Timeout(timeout time.Duration) OptionFunc

Timeout option for adjusting the timeout of the connection.

type TracedClient

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

TracedClient defines a HTTP client with tracing integrated.

func New added in v0.23.0

func New(oo ...OptionFunc) (*TracedClient, error)

New creates a new HTTP client.

func (*TracedClient) Do

func (tc *TracedClient) Do(ctx context.Context, req *http.Request) (*http.Response, error)

Do executes a HTTP request with integrated tracing and tracing propagation downstream.

Jump to

Keyboard shortcuts

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