ownercache

package
v0.0.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOwnerCache

func NewOwnerCache(manager manager.Manager, trigger Trigger) *ownerCache

func OwnerRefForObject

func OwnerRefForObject(obj client.Object) metav1.OwnerReference

Types

type OwnerCache

type OwnerCache interface {
	Wait()
	RegisterGroupKind(ctx context.Context, gk schema.GroupKind) error
	ReplaceObject(object client.Object) (utils.ObjectId, utils.ObjectIds)

	DeleteObject(id utils.ObjectId) utils.ObjectIds

	GetOwnersFor(id utils.ObjectId) utils.ObjectIds
	GetOwnersByTypeFor(id utils.ObjectId, gk schema.GroupKind) utils.ObjectIds
	GetSerfsFor(id utils.ObjectId) utils.ObjectIds
	GetSerfsWithTypeFor(id utils.ObjectId, gk schema.GroupKind) utils.ObjectIds
	GetSerfsForObject(obj client.Object) utils.ObjectIds
	GetSerfsWithTypeForObject(obj client.Object, gk schema.GroupKind) utils.ObjectIds

	CreateSerf(ctx context.Context, owner, serf client.Object, opts ...client.CreateOption) error
}

type Trigger

type Trigger interface {
	Trigger(id utils.ObjectId)
}

Jump to

Keyboard shortcuts

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