http

package
v0.0.0-...-a4cc684 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextDialer

type ContextDialer interface {
	DialContext(ctx context.Context, network string, addr string) (net.Conn, error)
	Close() error
}

type Option

type Option func(*options)

func WithInClusterDialer

func WithInClusterDialer(inClusterDialer ContextDialer) Option

func WithInsecureSkipVerify

func WithInsecureSkipVerify(insecureSkipVerify bool) Option

func WithSelectCA

func WithSelectCA(selectCA func(ctx context.Context, serverName string) (*x509.Certificate, error)) Option

type RoundTripCloser

type RoundTripCloser interface {
	http.RoundTripper
	io.Closer
}

func NewRoundTripper

func NewRoundTripper(opts ...Option) RoundTripCloser

NewRoundTripper returns new closable RoundTripper that first tries to dial connection in standard way, if the dial operation fails due to hostname resolution the RoundTripper tries to dial from in cluster pod.

This is useful for accessing cluster internal services (pushing a CloudEvent into Knative broker).

Jump to

Keyboard shortcuts

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