-
Notifications
You must be signed in to change notification settings - Fork 11
/
queue.go
37 lines (26 loc) · 960 Bytes
/
queue.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
33
34
35
36
37
package internal
import (
"time"
"k8s.io/apimachinery/pkg/runtime"
)
// QueueController manages updating component queue through CRD
type QueueController interface {
// Add adds Queue with priority list
Add(q runtime.Object, priorityQueues []string) error
// AddTop adds Queue to the top
AddTop(q runtime.Object) error
// First returns first component in Queue or current running Queue
First(namespace string) (runtime.Object, error)
// Remove removes Queue
Remove(q runtime.Object) error
// Size returns no of queues
Size(namespace string) int
// SetLastOrder sets queue order to the last
SetLastOrder(obj runtime.Object) error
// SetReverifyQueueAtFirst sets queue to reverify type
SetReverifyQueueAtFirst(q runtime.Object) error
// SetRetryQueue sets Queue to retry one time
SetRetryQueue(q runtime.Object, noOfRetry int, nextAt time.Time) error
// RemoveAllQueues removes all queues
RemoveAllQueues(namespace string) error
}