proxylistener

package module
v0.0.0-...-2f384fe Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

README

Build Status

proxylistener

A Go net.Listener that understands the haproxy PROXY protocol. Uses go-proxyproto.

Usage

func serveHere() error {
	l, err := proxylistener.Listen("tcp", "localhost:8080") // you can also use a unix socket if you wish
	if err != nil {
		return err
	}
	return http.Serve(l, FileServer("."))
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(network, address string) (net.Listener, error)

func ListenTCP

func ListenTCP(network string, laddr *net.TCPAddr) (net.Listener, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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