base

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context interface {
	QueryConnection(connectionID, randomID uint64) *base.ConnectionContext
	QueryProtocolMetrics(conMetrics *base.ConnectionMetricsContext, protocol enums.ConnectionProtocol) Metrics
}

type Metrics

type Metrics interface {
	base.ConnectionMetrics

	// FlushMetrics flush all metrics from traffic to the metricsBuilder
	FlushMetrics(traffic *base.ProcessTraffic, metricsBuilder *base.MetricsBuilder)
}

type Protocol

type Protocol interface {
	Protocol() enums.ConnectionProtocol
	GenerateMetrics() Metrics
	Init(config *profiling.TaskConfig)

	ParseProtocol(connectionID uint64, metrics Metrics, reader *buffer.Buffer) enums.ParseResult
	PackageMaxExpireDuration() time.Duration
	UpdateExtensionConfig(config *profiling.ExtensionConfig)
}

type ProtocolAnalyzer added in v0.5.0

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

ProtocolAnalyzer handler all socket data for each protocol

func NewProtocolAnalyzer added in v0.5.0

func NewProtocolAnalyzer(protocolContext Context, p Protocol, config *profiling.TaskConfig) *ProtocolAnalyzer

func (*ProtocolAnalyzer) ReceiveSocketCloseEvent added in v0.5.0

func (a *ProtocolAnalyzer) ReceiveSocketCloseEvent(event *events.SocketCloseEvent)

func (*ProtocolAnalyzer) ReceiveSocketData added in v0.5.0

func (a *ProtocolAnalyzer) ReceiveSocketData(ctx Context, event *events.SocketDataUploadEvent)

func (*ProtocolAnalyzer) ReceiveSocketDetail added in v0.5.0

func (a *ProtocolAnalyzer) ReceiveSocketDetail(ctx Context, event *events.SocketDetailEvent)

func (*ProtocolAnalyzer) Start added in v0.5.0

func (a *ProtocolAnalyzer) Start(ctx context.Context)

func (*ProtocolAnalyzer) UpdateExtensionConfig added in v0.5.0

func (a *ProtocolAnalyzer) UpdateExtensionConfig(config *profiling.ExtensionConfig)

Jump to

Keyboard shortcuts

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