listenerutil

package
v1.14.6 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MPL-2.0 Imports: 16 Imported by: 7

Documentation

Index

Constants

View Source
const BufConnType = "bufconn"

Variables

This section is empty.

Functions

func TLSConfig added in v1.5.0

func TLSConfig(
	l *configutil.Listener,
	props map[string]string,
	ui cli.Ui,
) (*tls.Config, reloadutil.ReloadFunc, error)

func UnixSocketListener

func UnixSocketListener(path string, unixSocketsConfig *UnixSocketsConfig) (net.Listener, error)

Types

type BufConnWrapper added in v1.9.0

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 NewBufConnWrapper added in v1.9.0

func NewBufConnWrapper(bcl *bufconn.Listener) *BufConnWrapper

NewBufConnWrapper returns a new BufConnWrapper using an existing bufconn.Listener

func (*BufConnWrapper) Dial added in v1.9.0

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 added in v1.9.0

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.

type Listener added in v1.5.0

type Listener struct {
	net.Listener
	Config *configutil.Listener
}

type UnixSocketsConfig

type UnixSocketsConfig struct {
	User  string `hcl:"user"`
	Mode  string `hcl:"mode"`
	Group string `hcl:"group"`
}

Jump to

Keyboard shortcuts

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