http

package
v0.0.0-...-0a426dc Latest Latest
Warning

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

Go to latest
Published: Dec 14, 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