-
Notifications
You must be signed in to change notification settings - Fork 11
/
queue.go
37 lines (26 loc) · 920 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"
"github.com/agoda-com/samsahai/api/v1beta1"
)
// QueueController manages updating component queue through CRD
type QueueController interface {
// Add adds Queue with priority list
Add(q *v1beta1.Queue, priorityQueues []string) error
// AddTop adds Queue to the top
AddTop(q *v1beta1.Queue) error
// First returns first component in Queue or current running Queue
First() (*v1beta1.Queue, error)
// Remove removes Queue
Remove(q *v1beta1.Queue) error
// Size returns no of queues
Size() int
// SetLastOrder sets queue order to the last
SetLastOrder(q *v1beta1.Queue) error
// SetReverifyQueueAtFirst sets queue to reverify type
SetReverifyQueueAtFirst(q *v1beta1.Queue) error
// SetRetryQueue sets Queue to retry one time
SetRetryQueue(q *v1beta1.Queue, noOfRetry int, nextAt time.Time) error
// RemoveAllQueues removes all queues
RemoveAllQueues() error
}