tlsclient

package
v0.0.0-...-820a931 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: AGPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPClient

func NewHTTPClient(opt HTTPEndpoint) (client *http.Client, u *url.URL, err error)

NewHTTPClient creates a http.Client and an url.URL for the given HTTP endpoint

Types

type ClientCertificateFilePair

type ClientCertificateFilePair struct {
	KeyFile         string
	CertificateFile string
}

ClientCertificateFilePair is a struct with a certificate and a key pair

type HTTPEndpoint

type HTTPEndpoint struct {
	Host      string
	Port      int
	Timeout   time.Duration
	EnvPrefix string

	RootCAFile             string
	ClientCertificateFiles ClientCertificateFilePair
	PinnedKey              string
	InsecureSkipValidation bool
	MaxIdleConnsPerHost    int
	DisableCompression     bool
}

HTTPEndpoint is a struct for specifying which parameters to use when connecting to a HTTP(S) endpoint

Jump to

Keyboard shortcuts

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