Documentation
¶
Overview ¶
Package server 实现 Pulse UDP 服务端。
Index ¶
- Variables
- func Run(ctx context.Context, port int, listenAddr string, outputRoot string, ...) error
- func TestResolveServerCSVPath_BoundaryCases(t *testing.T)
- func TestResolveServerCSVPath_DefaultOutputRoot(t *testing.T)
- func TestResolveServerCSVPath_DirectoryCreation(t *testing.T)
- func TestRun(t *testing.T)
Constants ¶
This section is empty.
Variables ¶
SessionTailGrace 控制会话主时长结束后的尾包等待时长。
Functions ¶
func Run ¶
func Run(ctx context.Context, port int, listenAddr string, outputRoot string, pcapPlanDir string, statsInterval time.Duration, statsWriter io.Writer, logger *slog.Logger) error
Run 在 ctx 取消或出错前阻塞监听 UDP。 pcapPlanDir 为 PCAP 回放时加载 plan 的目录(默认 plans);空字符串在调用方应已替换为 planpath.DefaultPlanDir。
func TestResolveServerCSVPath_BoundaryCases ¶
测试 resolveServerCSVPath 函数的边界情况
func TestResolveServerCSVPath_DefaultOutputRoot ¶
测试 resolveServerCSVPath 函数的默认输出目录
func TestResolveServerCSVPath_DirectoryCreation ¶
测试 resolveServerCSVPath 函数的目录创建
Types ¶
This section is empty.
Source Files
¶
- server.go
- server_test_config.go
- server_test_integration.go
- udp_stats.go
Click to show internal directories.
Click to hide internal directories.