master

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Master

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

Master 分布式压测调度端

func NewMaster

func NewMaster(cfg MasterConfig) (*Master, error)

NewMaster 创建 Master 实例并连接 Redis

func (*Master) ExportReportData

func (m *Master) ExportReportData(reportID string) (*report.ReportData, error)

ExportReportData 返回聚合后的数据(供 CLI 使用)

func (*Master) RegisterAgentFromRedis

func (m *Master) RegisterAgentFromRedis()

RegisterAgentFromRedis 从 Redis 恢复已注册的 Agent

func (*Master) Start

func (m *Master) Start() error

Start 启动 HTTP API 服务(阻塞)

func (*Master) Stop

func (m *Master) Stop() error

Stop 优雅停机

type MasterConfig

type MasterConfig struct {
	RedisConfig redis_interface.Config

	ListenAddr   string        // HTTP 监听地址,如 ":8080"
	ReportDir    string        // HTML 报告输出目录
	ReportExpiry time.Duration // 报告自动过期时长;0 表示永不过期(如 7*24*time.Hour = 7 天)
}

MasterConfig Master 启动配置

Jump to

Keyboard shortcuts

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