listeners

package
v6.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferedUnixConn

type BufferedUnixConn struct {
	*net.UnixConn
	// contains filtered or unexported fields
}

BufferedUnixConn is a UnixConn wrapped in a Bufio Reader.

func (BufferedUnixConn) Discard

func (b BufferedUnixConn) Discard(n int) (int, error)

Discard allows discarding some bytes from the buffer.

func (BufferedUnixConn) Peek

func (b BufferedUnixConn) Peek(n int) ([]byte, error)

Peek allows reading some bytes without moving the read pointer.

func (BufferedUnixConn) Read

func (b BufferedUnixConn) Read(p []byte) (int, error)

Read allows normal reads on the buffered connection.

func (BufferedUnixConn) Unix

func (b BufferedUnixConn) Unix() *net.UnixConn

Unix returns the inner UnixConn.

type FancyTLSListener

type FancyTLSListener struct {
	net.Listener
	// contains filtered or unexported fields
}

FancyTLSListener is a variation of the standard tls.Listener that supports atomically swapping the underlying TLS configuration and proxy protocol wrapping. Requests served before the swap will continue using the old configuration.

func NewFancyTLSListener

func NewFancyTLSListener(inner net.Listener, cert *localtls.CertInfo) *FancyTLSListener

NewFancyTLSListener creates a new FancyTLSListener.

func (*FancyTLSListener) Accept

func (l *FancyTLSListener) Accept() (net.Conn, error)

Accept waits for and returns the next incoming TLS connection then use the current TLS configuration to handle it.

func (*FancyTLSListener) Config

func (l *FancyTLSListener) Config(cert *localtls.CertInfo)

Config safely swaps the underlying TLS configuration.

func (*FancyTLSListener) TrustedProxy

func (l *FancyTLSListener) TrustedProxy(trustedProxy []net.IP)

TrustedProxy sets new the https trusted proxy configuration.

type StarttlsListener

type StarttlsListener struct {
	net.Listener
	// contains filtered or unexported fields
}

StarttlsListener is a variation of the standard tls.Listener that supports atomically swapping the underlying TLS configuration. Requests served before the swap will continue using the old configuration.

func NewSTARTTLSListener

func NewSTARTTLSListener(inner net.Listener, cert *localtls.CertInfo) *StarttlsListener

NewSTARTTLSListener creates a new STARTTLS listener.

func (*StarttlsListener) Accept

func (l *StarttlsListener) Accept() (net.Conn, error)

Accept waits for and returns the next incoming TLS connection then use the current TLS configuration to handle it.

func (*StarttlsListener) Config

func (l *StarttlsListener) Config(cert *localtls.CertInfo)

Config safely swaps the underlying TLS configuration.

Jump to

Keyboard shortcuts

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