k3s/vendor/github.com/rancher/wrangler/pkg/generic/controller.go

25 lines
587 B
Go
Raw Normal View History

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
"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"
)
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
}