listener

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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. Requests served before the swap will continue using the old configuration.

func NewFancyTLSListener

func NewFancyTLSListener(inner net.Listener, cert tls.Certificate) *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) Close

func (l *FancyTLSListener) Close() error

func (*FancyTLSListener) Config

func (l *FancyTLSListener) Config(cert tls.Certificate)

Config safely swaps the underlying TLS configuration.

func (*FancyTLSListener) TrustedProxy added in v0.2.0

func (l *FancyTLSListener) TrustedProxy(proxies []string) error

TrustedProxy sets new the https trusted proxy configuration.

Jump to

Keyboard shortcuts

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