listenerutil

package
v0.0.0-...-52b58a3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Apache-2.0, MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const BufConnType = "bufconn"

Variables

This section is empty.

Functions

func TLSConfig

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

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

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.

type Listener

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