-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherrors.go
32 lines (24 loc) · 1.07 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// -----------------------------------------------------------------------------
// worker for running tasks enqueued in background (errors.go)
//
// Copyright (C) 2024 Frank Mueller / Oldenburg / Germany / World
// -----------------------------------------------------------------------------
package worker // import "tideland.dev/go/worker"
// NotStartedError signals that the worker processor did not start.
type NotStartedError struct{}
func (NotStartedError) Error() string {
return "worker processor did not start in time"
}
// TimeoutError signals that the worker processor did not start in time.
type TimeoutError struct{}
func (TimeoutError) Error() string {
return "processing task lasts too long"
}
// ShuttingDownError signals that the worker processor is shutting down.
type ShuttingDownError struct{}
func (ShuttingDownError) Error() string {
return "worker processor is shutting down"
}
// -----------------------------------------------------------------------------
// end of file
// -----------------------------------------------------------------------------