-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinterface.go
28 lines (21 loc) · 919 Bytes
/
interface.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
package yacht
import (
"context"
"time"
"k8s.io/client-go/tools/cache"
rl "k8s.io/client-go/tools/leaderelection/resourcelock"
)
type Interface interface {
Enqueue(obj interface{})
WithEnqueueFunc(EnqueueFunc) *Controller
// Deprecated: Use WithHandlerContextFunc instead.
WithHandlerFunc(HandlerFunc) *Controller
WithHandlerContextFunc(HandlerContextFunc) *Controller
WithLeaderElection(leaseLock rl.Interface, leaseDuration, renewDeadline, retryPeriod time.Duration) *Controller
WithCacheSynced(...cache.InformerSynced) *Controller
}
// Deprecated: Use HandlerContextFunc instead.
type HandlerFunc func(key interface{}) (requeueAfter *time.Duration, err error)
type HandlerContextFunc func(ctx context.Context, key interface{}) (requeueAfter *time.Duration, err error)
type EnqueueFunc func(obj interface{}) (interface{}, error)
type EnqueueFilterFunc func(oldObj, newObj interface{}) (bool, error)