clientcache

package
v0.0.0-...-823d357 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientCache

type ClientCache interface {
	Get(interface{}) *http.Client
	Put(interface{}, *http.Client)
}

ClientCache is a cache for *http.Clients. It allows us to reuse clients and connections across multiple incoming calls, saving us TCP, TLS and proxy initialisations.

func New

func New(ttl time.Duration) ClientCache

New returns a new ClientCache

Jump to

Keyboard shortcuts

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