listener

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractListener

type AbstractListener struct {
	addr.ProtoName `yaml:",inline"`

	Address addr.ProtoAddress  `json:"address" description:"Connect a listening connection at this endpoint."`
	Forward *addr.ProtoAddress `` /* 130-byte string literal not displayed */

	Upstreams *upstream.Upstreams
	Config    cert.ConfigGetter
}

func (*AbstractListener) ConnectDirectly

func (l *AbstractListener) ConnectDirectly(conn net.Conn) bool

func (*AbstractListener) HandleConnection

func (l *AbstractListener) HandleConnection(conn net.Conn)

func (*AbstractListener) String

func (l *AbstractListener) String() string

type InputOutputListener

type InputOutputListener struct {
	AbstractListener
	InputOutput streams.Connection
	// contains filtered or unexported fields
}

func (*InputOutputListener) Shutdown

func (l *InputOutputListener) Shutdown() (err error)

func (*InputOutputListener) Start

func (l *InputOutputListener) Start(upstreams *upstream.Upstreams, config cert.ConfigGetter) (err error)

type Listener

type Listener interface {
	fmt.Stringer

	// Start will start listening on the given network
	Start(upstreams *upstream.Upstreams, config cert.ConfigGetter) error
	// Shutdown listening on a given port
	Shutdown() error
}

Listener is a high-level implementation that listens to connections and tries to connect to backend upstreams(s).

type Listeners

type Listeners []Listener

Listeners is a list of Listener objects.

func (*Listeners) MarshalFlag

func (ll *Listeners) MarshalFlag() (string, error)

MarshalFlag will serialize the whole Listeners for storage by flags

func (*Listeners) Start

func (ll *Listeners) Start(connector *upstream.Upstreams, config cert.ConfigGetter) error

func (*Listeners) UnmarshalFlag

func (ll *Listeners) UnmarshalFlag(data string) error

UnmarshalFlag will deserialize the flag (e.g. from command line) into the Listeners slice

type SocketListener

type SocketListener struct {
	AbstractListener
	// contains filtered or unexported fields
}

func (*SocketListener) Shutdown

func (l *SocketListener) Shutdown() (err error)

Shutdown stops listening on specific network connection

func (*SocketListener) Start

func (l *SocketListener) Start(upstreams *upstream.Upstreams, config cert.ConfigGetter) (err error)

Jump to

Keyboard shortcuts

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