server

package
v0.23.9 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PcapConfig added in v0.16.1

type PcapConfig struct {
	Device         string
	BufferSize     string
	ImmediateMode  bool
	SnapshotLength string
	Promiscuous    bool
	Timeout        time.Duration
	Filter         string
}

PcapConfig struct

type ProbeServer added in v0.4.0

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

ProbeServer struct

func NewProbeServer added in v0.4.0

func NewProbeServer(ctx context.Context, logger *zap.Logger) (*ProbeServer, error)

NewProbeServer returns a new Server

func (*ProbeServer) PcapConfig added in v0.16.1

func (s *ProbeServer) PcapConfig() PcapConfig

PcapConfig return ProbeServer.pcapConfig

func (*ProbeServer) Shutdown added in v0.4.0

func (s *ProbeServer) Shutdown()

Shutdown server.

func (*ProbeServer) Start added in v0.4.0

func (s *ProbeServer) Start() error

Start probe server.

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