Versions in this module Expand all Collapse all v0 v0.1.1 Apr 22, 2026 v0.1.0 Apr 14, 2026 Changes in this version + type AuthTokenChecker func(tokenStr string) *jwt.Token + type Bus interface + Publish func(event *Event) + Start func(ctx context.Context) error + Stop func() error + Subscribe func(filter FilterFunc) *Subscriber + Unsubscribe func(sub *Subscriber) + type ClientHeadUpdateData struct + CLHeadRoot string + CLHeadSlot uint64 + ClientIndex int + ClientName string + ELHeadHash string + ELHeadNumber uint64 + type ClientStatusUpdateData struct + CLReady bool + CLStatus string + ClientIndex int + ClientName string + ELReady bool + ELStatus string + type Event struct + Data json.RawMessage + ID uint64 + TaskIndex uint64 + TestRunID uint64 + Timestamp time.Time + Type EventType + func NewCustomEvent(eventType string, testRunID, taskIndex uint64, data any) (*Event, error) + func NewEvent(eventType EventType, testRunID, taskIndex uint64, data any) (*Event, error) + type EventBus struct + func NewEventBus(logger logrus.FieldLogger) *EventBus + func (eb *EventBus) NewCustomEvent(eventType string, testRunID, taskIndex uint64, data any) (*Event, error) + func (eb *EventBus) Publish(event *Event) + func (eb *EventBus) PublishClientHeadUpdate(clientIndex int, clientName string, clHeadSlot uint64, clHeadRoot string, ...) + func (eb *EventBus) PublishClientStatusUpdate(clientIndex int, clientName string, clStatus string, clReady bool, ...) + func (eb *EventBus) PublishTaskCompleted(testRunID, taskIndex uint64, taskName, taskTitle, taskID, result string) + func (eb *EventBus) PublishTaskCreated(testRunID, taskIndex uint64, taskName, taskTitle, taskID string, ...) + func (eb *EventBus) PublishTaskFailed(testRunID, taskIndex uint64, taskName, taskTitle, taskID, errMsg string) + func (eb *EventBus) PublishTaskLog(testRunID, taskIndex uint64, taskName, taskID, level, message string, ...) + func (eb *EventBus) PublishTaskProgress(testRunID, taskIndex uint64, taskName, taskTitle, taskID string, ...) + func (eb *EventBus) PublishTaskStarted(testRunID, taskIndex uint64, taskName, taskTitle, taskID string) + func (eb *EventBus) PublishTestCompleted(testRunID uint64, testID, testName, status string) + func (eb *EventBus) PublishTestFailed(testRunID uint64, testID, testName, errMsg string) + func (eb *EventBus) PublishTestStarted(testRunID uint64, testID, testName string) + func (eb *EventBus) Start(ctx context.Context) error + func (eb *EventBus) Stop() error + func (eb *EventBus) Subscribe(filter FilterFunc) *Subscriber + func (eb *EventBus) Unsubscribe(sub *Subscriber) + type EventType string + const EventClientHeadUpdate + const EventClientStatusUpdate + const EventTaskCompleted + const EventTaskCreated + const EventTaskFailed + const EventTaskLog + const EventTaskProgress + const EventTaskStarted + const EventTestCompleted + const EventTestFailed + const EventTestStarted + type FilterFunc func(*Event) bool + func CombineFilters(filters ...FilterFunc) FilterFunc + func CreateEventTypeFilter(eventTypes ...EventType) FilterFunc + func CreateTestRunFilter(testRunID uint64) FilterFunc + type SSEHandler struct + func NewSSEHandler(logger logrus.FieldLogger, eventBus *EventBus) *SSEHandler + func NewSSEHandlerWithAuth(logger logrus.FieldLogger, eventBus *EventBus, authChecker AuthTokenChecker, ...) *SSEHandler + func (h *SSEHandler) HandleClientStream(w http.ResponseWriter, r *http.Request) + func (h *SSEHandler) HandleGlobalStream(w http.ResponseWriter, r *http.Request) + func (h *SSEHandler) HandleTestRunStream(w http.ResponseWriter, r *http.Request, testRunID uint64) + type SSEMiddleware struct + func NewSSEMiddleware(logger logrus.FieldLogger, eventBus *EventBus) *SSEMiddleware + func (m *SSEMiddleware) GlobalStreamHandler() http.HandlerFunc + func (m *SSEMiddleware) TestRunStreamHandler(testRunID uint64) http.HandlerFunc + type Subscriber struct + func (s *Subscriber) Channel() <-chan *Event + type TaskCompletedData struct + Result string + TaskID string + TaskName string + TaskTitle string + type TaskCreatedData struct + ParentIndex uint64 + RunConcurrent bool + TaskID string + TaskName string + TaskTitle string + type TaskFailedData struct + Error string + TaskID string + TaskName string + TaskTitle string + type TaskLogData struct + Fields map[string]any + Level string + Message string + TaskID string + TaskName string + Timestamp time.Time + type TaskProgressData struct + Message string + Progress float64 + TaskID string + TaskName string + TaskTitle string + type TaskStartedData struct + TaskID string + TaskName string + TaskTitle string + type TestCompletedData struct + Status string + TestID string + TestName string + type TestFailedData struct + Error string + TestID string + TestName string + type TestStartedData struct + TestID string + TestName string