outbound

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearSession added in v1.3.4

func ClearSession(traceID string)

ClearSession 回放结束后掉一下这个方法。

func RemoveHandler

func RemoveHandler(ctx context.Context, traceID string)

func Start

func Start(addr *net.TCPAddr)

func StoreHandler

func StoreHandler(ctx context.Context, traceID string)

Types

type ConnState

type ConnState struct {
	*Handler
	// contains filtered or unexported fields
}

ConnState 连接管理

func (*ConnState) ProcessRequest

func (cs *ConnState) ProcessRequest(ctx context.Context, requestID int) bool

ProcessRequest 处理请求, false:关闭conn,true:保持conn

type Handler

type Handler struct {
	Ctx              context.Context    // 串联日志
	Matcher          match.MatcherIf    // 匹配引擎
	ReplayingSession *replaying.Session // 待匹配session
	ReplayedSession  *replayed.Session  // 记录匹配详细信息
}

type Proxyer

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

Proxyer Proxyer

func NewProxyer

func NewProxyer(srcConn *net.TCPConn) *Proxyer

NewProxyer 新建代理

func (*Proxyer) Close

func (p *Proxyer) Close()

Close 关闭代理

func (*Proxyer) Write

func (p *Proxyer) Write(ctx context.Context, proxyAddr string, request []byte) error

Write 往代理连接写数据

type Server

type Server struct {
	sync.Mutex
	Handlers map[string]*Handler
}
var OutboundServer Server

type SessionInfo added in v1.3.4

type SessionInfo struct {
	sync.Mutex
	LastMatchedIndex int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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