server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	Close context.CancelFunc
	// contains filtered or unexported fields
}

Proxy struct

func NewProxy

func NewProxy(s *Server, conn, remoteConn *net.TCPConn) *Proxy

NewProxy returns a new Proxy

func (*Proxy) Start

func (p *Proxy) Start()

Start proxy

type Server

type Server struct {
	Wg         *sync.WaitGroup
	ClosedChan chan struct{}
	// contains filtered or unexported fields
}

Server struct

func NewServer

func NewServer(ctx context.Context, lAddr, rAddr *net.TCPAddr, logger *zap.Logger) *Server

NewServer returns a new Server

func (*Server) GracefulShutdown

func (s *Server) GracefulShutdown()

GracefulShutdown server.

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown server.

func (*Server) Start

func (s *Server) Start() error

Start server.

Jump to

Keyboard shortcuts

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