netutil

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package netutil has helper types for working with network connections.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialer

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

Dialer is a type that has a DialContext method for making a network connection.

func NewLocalDialer

func NewLocalDialer(underlying Dialer, portToAddr map[string]string) Dialer

NewLocalDialer creates a new Dialer which routes localhost traffic to the remote destinations defined by `portToAddr`.

Jump to

Keyboard shortcuts

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