track worker liveness (#1170)

This commit is contained in:
Paul Wells
2025-08-14 10:53:56 -07:00
committed by GitHub
parent 236ffc7e5e
commit 6cedf7e38e
2 changed files with 4 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ import (
"time"
)
const Version_6JD79I0 = true
const Version_P0N4MSO = true
type KeyResolver interface {
Resolve(string)
@@ -58,6 +58,7 @@ type WorkerReporter interface {
ReportStatus(v WorkerStatus)
ReportStartTime(v time.Time)
ReportJobsCurrent(v uint32)
ReportLive(v uint8)
ReportCPU(v int64)
ReportCPULimit(v int64)
ReportMem(v int64)
@@ -73,6 +74,7 @@ type WorkerTx interface {
ReportStatus(v WorkerStatus)
ReportStartTime(v time.Time)
ReportJobsCurrent(v uint32)
ReportLive(v uint8)
ReportCPU(v int64)
ReportCPULimit(v int64)
ReportMem(v int64)

View File

@@ -95,6 +95,7 @@ func (r *noopWorkerReporter) ReportLoad(v float32)
func (r *noopWorkerReporter) ReportStatus(v WorkerStatus) {}
func (r *noopWorkerReporter) ReportStartTime(v time.Time) {}
func (r *noopWorkerReporter) ReportJobsCurrent(v uint32) {}
func (r *noopWorkerReporter) ReportLive(v uint8) {}
func (r *noopWorkerReporter) ReportCPU(v int64) {}
func (r *noopWorkerReporter) ReportCPULimit(v int64) {}
func (r *noopWorkerReporter) ReportMem(v int64) {}