forwarder

package
v0.0.0-...-666132b Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: Apache-2.0 Imports: 41 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Request *proto.ForwardEchoRequest
	UDS     string
	// XDSTestBootstrap, for gRPC forwarders, is used to set the bootstrap without using a global one defined in the env
	XDSTestBootstrap []byte
	// Http proxy used for connection
	Proxy string

	PropagateResponse func(req *http.Request, resp *http.Response)
	// contains filtered or unexported fields
}

type Instance

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

Instance is a client for forwarding requests to echo servers.

func New

func New() *Instance

New creates a new forwarder Instance.

func (*Instance) Close

func (i *Instance) Close() error

func (*Instance) ForwardEcho

func (i *Instance) ForwardEcho(ctx context.Context, cfg *Config) (*proto.ForwardEchoResponse, error)

ForwardEcho sends the requests and collect the responses.

type SpecificVersionDialer

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

func (SpecificVersionDialer) Dial

func (s SpecificVersionDialer) Dial(network, addr string) (c net.Conn, err error)

func (SpecificVersionDialer) DialContext

func (s SpecificVersionDialer) DialContext(ctx context.Context, network, address string) (net.Conn, error)

Jump to

Keyboard shortcuts

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