Documentation
¶
Index ¶
- Variables
- type ErrorInfo
- type ProgressPoint
- type Response
- type SSEEvent
- type Server
- type Store
- func (s *Store) CleanupOrphanedTests() []string
- func (s *Store) CompleteTest(runID string, req reporting.TestCompleteRequest) error
- func (s *Store) CreateTest(req reporting.TestKeepaliveRequest) error
- func (s *Store) GetTest(runID string) (*TestData, error)
- func (s *Store) GetTestDetail(runID string) (*TestDetail, error)
- func (s *Store) ListTests(activeOnly bool) []TestSummary
- func (s *Store) MarkOrphanedTests() []string
- func (s *Store) Start()
- func (s *Store) Stop()
- func (s *Store) UpdateProgress(runID string, metrics reporting.ProgressMetrics) error
- func (s *Store) UpdateTestKeepalive(req reporting.TestKeepaliveRequest) error
- type TestData
- type TestDetail
- type TestListResponse
- type TestSummary
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ProgressPoint ¶
type ProgressPoint struct {
Timestamp time.Time `json:"timestamp"`
Metrics reporting.ProgressMetrics `json:"metrics"`
}
type Response ¶
type Response struct {
Data interface{} `json:"data,omitempty"`
Error *ErrorInfo `json:"error,omitempty"`
}
API response types
type SSEEvent ¶
type SSEEvent struct {
Type string `json:"type"` // "test_start", "test_progress", "test_complete"
RunID string `json:"run_id"`
Timestamp time.Time `json:"timestamp"`
Data interface{} `json:"data"`
}
SSE event types
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) EnableMockMode ¶
func (s *Server) EnableMockMode()
EnableMockMode enables mock mode and generates test data
func (*Server) SetCORSOrigins ¶
SetCORSOrigins sets the allowed CORS origins
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStore ¶
func NewStore(log logrus.FieldLogger) *Store
func (*Store) CleanupOrphanedTests ¶
func (*Store) CompleteTest ¶
func (s *Store) CompleteTest(runID string, req reporting.TestCompleteRequest) error
func (*Store) CreateTest ¶
func (s *Store) CreateTest(req reporting.TestKeepaliveRequest) error
Write operations
func (*Store) GetTestDetail ¶
func (s *Store) GetTestDetail(runID string) (*TestDetail, error)
func (*Store) ListTests ¶
func (s *Store) ListTests(activeOnly bool) []TestSummary
func (*Store) MarkOrphanedTests ¶
MarkOrphanedTests marks tests as orphaned if no keepalive for a given interval
func (*Store) UpdateProgress ¶
func (s *Store) UpdateProgress(runID string, metrics reporting.ProgressMetrics) error
func (*Store) UpdateTestKeepalive ¶
func (s *Store) UpdateTestKeepalive(req reporting.TestKeepaliveRequest) error
type TestData ¶
type TestData struct {
RunID string
Network string
Labels map[string]string
StartTime time.Time
LastUpdate time.Time
EndTime *time.Time
IsRunning bool
IsComplete bool
Error string
ELClient reporting.ClientConfig
CLClient reporting.ClientConfig
EnclaveName string
SystemInfo *sysinfo.SystemInfo
RunTimeout int64
CurrentMetrics *reporting.ProgressMetrics
History []ProgressPoint
}
type TestDetail ¶
type TestDetail struct {
TestSummary
ProgressHistory []ProgressPoint `json:"progress_history"`
ELClientConfig reporting.ClientConfig `json:"el_client_config"`
CLClientConfig reporting.ClientConfig `json:"cl_client_config"`
EnclaveName string `json:"enclave_name"`
EndTime *time.Time `json:"end_time,omitempty"`
Error string `json:"error,omitempty"`
}
type TestListResponse ¶
type TestListResponse struct {
Tests []TestSummary `json:"tests"`
TotalCount int `json:"total_count"`
ActiveCount int `json:"active_count"`
}
type TestSummary ¶
type TestSummary struct {
RunID string `json:"run_id"`
Network string `json:"network"`
Labels map[string]string `json:"labels,omitempty"`
StartTime time.Time `json:"start_time"`
LastUpdate time.Time `json:"last_update"`
IsRunning bool `json:"is_running"`
IsComplete bool `json:"is_complete"`
ELClient string `json:"el_client"`
CLClient string `json:"cl_client"`
ELClientConfig reporting.ClientConfig `json:"el_client_config"`
CLClientConfig reporting.ClientConfig `json:"cl_client_config"`
CurrentMetrics *reporting.ProgressMetrics `json:"current_metrics,omitempty"`
SystemInfo *sysinfo.SystemInfo `json:"system_info,omitempty"`
RunTimeout int64 `json:"run_timeout,omitempty"`
Error string `json:"error,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.