http

package
v2.0.0-...-5e8ce1c Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvRetryMax         = "ARGOCD_K8SCLIENT_RETRY_MAX"
	EnvRetryBaseBackoff = "ARGOCD_K8SCLIENT_RETRY_BASE_BACKOFF"
)

Variables

This section is empty.

Functions

func JoinCookies

func JoinCookies(key string, cookieList []*http.Cookie) (string, error)

JoinCookies combines chunks of cookie based on key as prefix. It returns cookie value as string. cookieString is of format key1=value1; key2=value2; key3=value3 first chunk will be of format argocd.token=<numberOfChunks>:token; attributes

func MakeCookieMetadata

func MakeCookieMetadata(key, value string, flags ...string) ([]string, error)

MakeCookieMetadata generates a string representing a Web cookie. Yum!

func WithRetry

func WithRetry(maxRetries int64, baseRetryBackoff time.Duration) transport.WrapperFunc

Types

type DebugTransport

type DebugTransport struct {
	T http.RoundTripper
}

DebugTransport is a HTTP Client Transport to enable debugging

func (DebugTransport) RoundTrip

func (d DebugTransport) RoundTrip(req *http.Request) (*http.Response, error)

type TransportWithHeader

type TransportWithHeader struct {
	RoundTripper http.RoundTripper
	Header       http.Header
}

TransportWithHeader is a HTTP Client Transport with default headers.

func (*TransportWithHeader) RoundTrip

func (rt *TransportWithHeader) RoundTrip(r *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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