bufconndialer

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MPL-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufConnWrapper

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

BufConnWrapper implements consul-template's TransportDialer using a bufconn listener, to provide a way to Dial the in-memory listener

func New

func New() (net.Listener, *BufConnWrapper)

New returns a new BufConnWrapper with a new bufconn.Listener. The wrapper provides a dialer for creating connections to the listener.

func NewBufConnWrapper

func NewBufConnWrapper(bcl *bufconn.Listener) *BufConnWrapper

NewBufConnWrapper returns a new BufConnWrapper using an existing bufconn.Listener

func (*BufConnWrapper) Dial

func (bcl *BufConnWrapper) Dial(_, _ string) (net.Conn, error)

Dial connects to the listening end of the bufconn (satisfies consul-template's TransportDialer interface). This is essentially the client side of the bufconn connection.

func (*BufConnWrapper) DialContext

func (bcl *BufConnWrapper) DialContext(ctx context.Context, _, _ string) (net.Conn, error)

DialContext connects to the listening end of the bufconn (satisfies consul-template's TransportDialer interface). This is essentially the client side of the bufconn connection.

Jump to

Keyboard shortcuts

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