httpclient

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Service = dependency.Service{
	Name:        "httpclient",
	Constructor: New,
}

Service adds the ability to use the *http.Client type to the dependency injection container

Functions

func New

func New(params Params) *http.Client

New creates a new instance of an *http.Client

Types

type Params

type Params struct {
	fx.In

	Trippers []Tripper `group:"trippers"`
}

Params contains all of the required parameters to create an *http.Client, allowing you to wrap the transport

type Tripper

type Tripper func(tripper http.RoundTripper) http.RoundTripper

Tripper is a type that can wrap an http.RoundTripper

Jump to

Keyboard shortcuts

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