tcplistener

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: ISC Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCPListener

type TCPListener struct {
	// contains filtered or unexported fields
}

func NewTCPListener

func NewTCPListener(serverConfig *TCPListenerConfigInput) *TCPListener

func (*TCPListener) Initialize

func (t *TCPListener) Initialize()

func (*TCPListener) IsServing

func (t *TCPListener) IsServing() bool

func (*TCPListener) Listen

func (t *TCPListener) Listen() error

Listen listens on the TCP network address s.Addr and then calls serve to handle incoming connections.

func (*TCPListener) Reset

func (t *TCPListener) Reset(newConfig *ttutils.ConfigRoot) (*TCPListener, error)

func (*TCPListener) Serve

func (t *TCPListener) Serve() error

serve accepts incoming connections on the netListener l, creating a new service goroutine for each.

The netListener is closed when this function returns.

func (*TCPListener) Shutdown

func (t *TCPListener) Shutdown() error

type TCPListenerConfigInput

type TCPListenerConfigInput struct {
	Config           *ttutils.ConfigRoot
	Cache            func() ttcache.ICacheCache
	ServeConnHandler tthandler.IServeConnHandler
	PrometheusFire   func(*ttprom.PrometheusMetric) error
	Logger           *logrus.Entry
}

Jump to

Keyboard shortcuts

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