client

package
v0.0.0-...-da4d284 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: ISC Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidSocket = errors.New("invalid socket type")
	ErrInvalidSCM    = errors.New("invalid number of socket control messages")
	ErrInvalidFDs    = errors.New("invalid number of file descriptors")
)

Errors

View Source
var (
	ErrNoSocket   = errors.New("no sockets setup")
	ErrRunning    = errors.New("already running")
	ErrNotRunning = errors.New("not running")
	ErrStopped    = errors.New("stopped")
)

Errors

Functions

func Close

func Close() error

Close closes all open proxied listeners and stop the client

func Run

func Run() error

Run starts the client and blocks until the client stops, returning the error if any

func Setup

func Setup(s *http.Server) error

Setup will setup the client with the given http Server.

This is optional as it will use the http DefaultServer by default

func SetupTLS

func SetupTLS(s *http.Server, certFile, keyFile string) error

SetupTLS is used to setup the http Server and tls information

func SetupTest

func SetupTest(lnet, laddr string) error

SetupTest will bypass the proxy and create a listener itself from the given details.

Useful when testing a server and don't want to run the full proxy to do so

func Start

func Start() error

Start starts the client and returns immediately

func Wait

func Wait() error

Wait waits for the client to stop and returns any error

Types

This section is empty.

Jump to

Keyboard shortcuts

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