File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ type WorkerReporter interface {
5858 ReportStatus (v WorkerStatus )
5959 ReportStartTime (v time.Time )
6060 ReportJobsCurrent (v uint32 )
61- ReportKind (v AgentKind )
6261 ReportCPU (v int64 )
6362 ReportCPULimit (v int64 )
6463 ReportMem (v int64 )
@@ -74,7 +73,6 @@ type WorkerTx interface {
7473 ReportStatus (v WorkerStatus )
7574 ReportStartTime (v time.Time )
7675 ReportJobsCurrent (v uint32 )
77- ReportKind (v AgentKind )
7876 ReportCPU (v int64 )
7977 ReportCPULimit (v int64 )
8078 ReportMem (v int64 )
@@ -91,6 +89,7 @@ type JobReporter interface {
9189 TxAt (time.Time , func (tx JobTx ))
9290 ReportRoomSessionID (v string )
9391 ReportKind (v JobKind )
92+ ReportWorkerKind (v WorkerKind )
9493 ReportStatus (v JobStatus )
9594 ReportDuration (v uint32 )
9695 ReportDurationMinutes (v uint8 )
@@ -102,6 +101,7 @@ type JobReporter interface {
102101type JobTx interface {
103102 ReportRoomSessionID (v string )
104103 ReportKind (v JobKind )
104+ ReportWorkerKind (v WorkerKind )
105105 ReportStatus (v JobStatus )
106106 ReportDuration (v uint32 )
107107 ReportDurationMinutes (v uint8 )
Original file line number Diff line number Diff line change @@ -95,7 +95,6 @@ func (r *noopWorkerReporter) ReportLoad(v float32)
9595func (r * noopWorkerReporter ) ReportStatus (v WorkerStatus ) {}
9696func (r * noopWorkerReporter ) ReportStartTime (v time.Time ) {}
9797func (r * noopWorkerReporter ) ReportJobsCurrent (v uint32 ) {}
98- func (r * noopWorkerReporter ) ReportKind (v AgentKind ) {}
9998func (r * noopWorkerReporter ) ReportCPU (v int64 ) {}
10099func (r * noopWorkerReporter ) ReportCPULimit (v int64 ) {}
101100func (r * noopWorkerReporter ) ReportMem (v int64 ) {}
@@ -122,6 +121,7 @@ func (r *noopJobReporter) Tx(f func(JobTx)) {}
122121func (r * noopJobReporter ) TxAt (ts time.Time , f func (JobTx )) {}
123122func (r * noopJobReporter ) ReportRoomSessionID (v string ) {}
124123func (r * noopJobReporter ) ReportKind (v JobKind ) {}
124+ func (r * noopJobReporter ) ReportWorkerKind (v WorkerKind ) {}
125125func (r * noopJobReporter ) ReportStatus (v JobStatus ) {}
126126func (r * noopJobReporter ) ReportDuration (v uint32 ) {}
127127func (r * noopJobReporter ) ReportDurationMinutes (v uint8 ) {}
Original file line number Diff line number Diff line change 99 WorkerStatusFull WorkerStatus = "full"
1010)
1111
12- type AgentKind string
13-
14- const (
15- AgentKindUndefined AgentKind = ""
16- AgentKindCloud AgentKind = "cloud"
17- AgentKindSelfhost AgentKind = "selfhost"
18- )
19-
2012type WorkerState string
2113
2214const (
@@ -34,6 +26,14 @@ const (
3426 JobKindParticipant JobKind = "participant"
3527)
3628
29+ type WorkerKind string
30+
31+ const (
32+ WorkerKindUndefined WorkerKind = ""
33+ WorkerKindCloud WorkerKind = "cloud"
34+ WorkerKindSelfhost WorkerKind = "selfhost"
35+ )
36+
3737type JobStatus string
3838
3939const (
You can’t perform that action at this time.
0 commit comments