summaryrefslogtreecommitdiff
path: root/pkg/events
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-08-18 16:13:49 +0300
committerValery Piashchynski <[email protected]>2021-08-18 16:13:49 +0300
commitc35fbff05205330ab8e49f6008fdbd59128cee14 (patch)
treed3eb03e8db7231d97ae4ff1d60a0c5a50db8a6fb /pkg/events
parent1d092e57afb55a01283b41942ca3ef15a7e4bdef (diff)
Add prometheus metrics for the jobs, update tests
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/events')
-rw-r--r--pkg/events/jobs_events.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/pkg/events/jobs_events.go b/pkg/events/jobs_events.go
index 300f6748..f65ede67 100644
--- a/pkg/events/jobs_events.go
+++ b/pkg/events/jobs_events.go
@@ -6,7 +6,7 @@ import (
const (
// EventPushOK thrown when new job has been added. JobEvent is passed as context.
- EventPushOK = iota + 12000
+ EventPushOK J = iota + 12000
// EventPushError caused when job can not be registered.
EventPushError
@@ -58,6 +58,8 @@ func (ev J) String() string {
return "EventPipeError"
case EventDriverReady:
return "EventDriverReady"
+ case EventPipePaused:
+ return "EventPipePaused"
}
return UnknownEventType
}
@@ -67,16 +69,12 @@ type JobEvent struct {
Event J
// String is job id.
ID string
-
// Pipeline name
Pipeline string
-
// Associated driver name (amqp, ephemeral, etc)
Driver string
-
// Error for the jobs/pipes errors
Error error
-
// event timings
Start time.Time
Elapsed time.Duration