reporting

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(serverURL, authToken string, log logrus.FieldLogger) *Client

func (*Client) ReportProgress

func (c *Client) ReportProgress(metrics ProgressMetrics)

func (*Client) ReportTestComplete

func (c *Client) ReportTestComplete(ctx context.Context, req TestCompleteRequest) error

func (*Client) ReportTestKeepAlive

func (c *Client) ReportTestKeepAlive(ctx context.Context, req TestKeepaliveRequest) error

Main reporting methods

func (*Client) Start

func (c *Client) Start(ctx context.Context)

func (*Client) Stop

func (c *Client) Stop()

type ClientConfig

type ClientConfig struct {
	Type    string            `json:"type"`
	Image   string            `json:"image"`
	Cmd     []string          `json:"cmd,omitempty"`
	EnvVars map[string]string `json:"env_vars,omitempty"`
}

type ProgressMetrics

type ProgressMetrics struct {
	Block uint64 `json:"block"`
	Slot  uint64 `json:"slot"`

	ExecPeers       uint64  `json:"exec_peers"`
	ConsPeers       uint64  `json:"cons_peers"`
	ExecSyncPercent float64 `json:"exec_sync_percent"`
	ConsSyncPercent float64 `json:"cons_sync_percent"`
	ExecVersion     string  `json:"exec_version,omitempty"`
	ConsVersion     string  `json:"cons_version,omitempty"`

	// Docker metrics for execution client
	ExecDiskUsage       uint64  `json:"exec_disk_usage"`
	ExecMemoryUsage     uint64  `json:"exec_memory_usage"`
	ExecBlockIORead     uint64  `json:"exec_block_io_read"`
	ExecBlockIOWrite    uint64  `json:"exec_block_io_write"`
	ExecCPUUsagePercent float64 `json:"exec_cpu_usage_percent"`

	// Docker metrics for consensus client
	ConsDiskUsage       uint64  `json:"cons_disk_usage"`
	ConsMemoryUsage     uint64  `json:"cons_memory_usage"`
	ConsBlockIORead     uint64  `json:"cons_block_io_read"`
	ConsBlockIOWrite    uint64  `json:"cons_block_io_write"`
	ConsCPUUsagePercent float64 `json:"cons_cpu_usage_percent"`
}

type ProgressUpdateRequest

type ProgressUpdateRequest struct {
	Timestamp  int64           `json:"timestamp"`
	Metrics    ProgressMetrics `json:"metrics"`
	IsComplete bool            `json:"is_complete"`
}

type TestCompleteRequest

type TestCompleteRequest struct {
	Timestamp  int64  `json:"timestamp"`
	FinalBlock uint64 `json:"final_block"`
	FinalSlot  uint64 `json:"final_slot"`
	Success    bool   `json:"success"`
	Error      string `json:"error,omitempty"`
}

type TestKeepaliveRequest

type TestKeepaliveRequest struct {
	RunID       string              `json:"run_id"`
	Timestamp   int64               `json:"timestamp"`
	Network     string              `json:"network"`
	Labels      map[string]string   `json:"labels,omitempty"`
	ELClient    ClientConfig        `json:"el_client"`
	CLClient    ClientConfig        `json:"cl_client"`
	EnclaveName string              `json:"enclave_name"`
	SystemInfo  *sysinfo.SystemInfo `json:"system_info,omitempty"`
	RunTimeout  int64               `json:"run_timeout,omitempty"`
}

TestKeepaliveRequest represents a keepalive request to maintain test connection

Jump to

Keyboard shortcuts

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