relatedresource

package
v0.8.4-0...-97960e5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AllKey = "_all_"
)

Variables

This section is empty.

Functions

func Watch

func Watch(ctx context.Context, name string, resolve Resolver, enq Enqueuer, watching ...ControllerWrapper)

func WatchClusterScoped

func WatchClusterScoped(ctx context.Context, name string, resolve Resolver, enq ClusterScopedEnqueuer, watching ...ControllerWrapper)

Types

type ClusterScopedEnqueuer

type ClusterScopedEnqueuer interface {
	Enqueue(name string)
}

type ControllerWrapper

type ControllerWrapper interface {
	Informer() cache.SharedIndexInformer
	AddGenericHandler(ctx context.Context, name string, handler generic.Handler)
}

type Enqueuer

type Enqueuer interface {
	Enqueue(namespace, name string)
}

type Key

type Key struct {
	Namespace string
	Name      string
}

func FromString

func FromString(key string) Key

func NewKey

func NewKey(namespace, name string) Key

func TriggerAllKey

func TriggerAllKey(namespace, name string, obj runtime.Object) ([]Key, error)

type Resolver

type Resolver func(namespace, name string, obj runtime.Object) ([]Key, error)

func OwnerResolver

func OwnerResolver(namespaced bool, apiVersion, kind string) Resolver

OwnerResolver Look for owner references that match the apiVersion and kind and resolve to the namespace and name of the parent. The namespaced flag is whether the apiVersion/kind referenced is expected to be namespaced

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL