transport

package
v1.12.3 Latest Latest
Warning

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

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

Documentation

Overview

Package transport contains HTTP transport utilities for Crossplane.

Index

Constants

This section is empty.

Variables

View Source
var DefaultUserAgent = fmt.Sprintf("%s/%s", "crossplane", version.New().GetVersionString())

DefaultUserAgent is the default User-Agent header that is set when making HTTP requests for packages.

Functions

This section is empty.

Types

type UserAgent

type UserAgent struct {
	// contains filtered or unexported fields
}

UserAgent wraps a RoundTripper and injects a user agent header.

func NewUserAgent

func NewUserAgent(rt http.RoundTripper, userAgent string) *UserAgent

NewUserAgent constructs a new UserAgent transport.

func (*UserAgent) RoundTrip

func (u *UserAgent) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip injects a User-Agent header into every request.

Jump to

Keyboard shortcuts

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