oakclient

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 5 Imported by: 2

Documentation

Overview

Package oakclient provides a secure HTTP client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(withOptions ...Option) (*http.Client, error)

Types

type Option

type Option func(*options) error

func WithDefaultOptions

func WithDefaultOptions() Option

WithDefaultOptions sets any unset Option to its default value. The default values are optimized for a typical secure remote procedure calls.

func WithExpectContinueTimeout

func WithExpectContinueTimeout(d time.Duration) Option

WithExpectContinueTimeout sets http.Transport.ExpectContinueTimeout.

func WithKeepAlive

func WithKeepAlive(d time.Duration) Option

WithKeepAlive sets net.Dialer.KeepAlive.

func WithMaxConnsPerHost

func WithMaxConnsPerHost(n int) Option

WithMaxConnsPerHost sets http.Transport.MaxConnsPerHost.

func WithMaxIdleConnsPerHost

func WithMaxIdleConnsPerHost(n int) Option

WithMaxIdleConnsPerHost sets http.Transport.MaxIdleConnsPerHost.

func WithResponseHeaderTimeout

func WithResponseHeaderTimeout(d time.Duration) Option

WithResponseHeaderTimeout sets http.Transport.ResponseHeaderTimeout.

func WithTLSHandshakeTimeout

func WithTLSHandshakeTimeout(d time.Duration) Option

WithTLSHandshakeTimeout sets http.Transport.TLSHandshakeTimeout.

func WithTimeout

func WithTimeout(d time.Duration) Option

WithTimeout sets http.Client.Timeout and net.Dialer.Timeout.

Jump to

Keyboard shortcuts

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