2019-05-09 22:03:45 +00:00
|
|
|
package generic
|
|
|
|
|
|
|
|
import (
|
2019-12-12 01:27:03 +00:00
|
|
|
"context"
|
2019-05-09 22:03:45 +00:00
|
|
|
|
2021-07-02 22:06:02 +00:00
|
|
|
"github.com/rancher/lasso/pkg/controller"
|
|
|
|
|
2019-05-09 22:03:45 +00:00
|
|
|
"k8s.io/apimachinery/pkg/runtime"
|
2019-12-12 01:27:03 +00:00
|
|
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
2019-05-09 22:03:45 +00:00
|
|
|
"k8s.io/client-go/tools/cache"
|
|
|
|
)
|
|
|
|
|
2021-07-02 22:06:02 +00:00
|
|
|
var ErrSkip = controller.ErrIgnore
|
2019-12-12 01:27:03 +00:00
|
|
|
|
2019-05-09 22:03:45 +00:00
|
|
|
type Handler func(key string, obj runtime.Object) (runtime.Object, error)
|
|
|
|
|
2019-12-12 01:27:03 +00:00
|
|
|
type ControllerMeta interface {
|
|
|
|
Informer() cache.SharedIndexInformer
|
|
|
|
GroupVersionKind() schema.GroupVersionKind
|
|
|
|
|
|
|
|
AddGenericHandler(ctx context.Context, name string, handler Handler)
|
|
|
|
AddGenericRemoveHandler(ctx context.Context, name string, handler Handler)
|
|
|
|
Updater() Updater
|
2019-05-09 22:03:45 +00:00
|
|
|
}
|