hook

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientHook

type ClientHook interface {
	syncer.Base

	// Resource is the typed resource (e.g. &corev1.Pod{}) that should get mutated.
	Resource() client.Object
}

ClientHook tells the sdk that this action watches on certain vcluster requests and wants to mutate these. The objects this action wants to watch can be defined through the Resource() function that returns a new object of the type to watch. By implementing the defined interfaces below it is possible to watch on: Create, Update (includes patch requests), Delete and Get requests. This makes it possible to change incoming or outgoing objects on the fly, without the need to completely replace a vanilla vcluster syncer.

type MutateCreatePhysical

type MutateCreatePhysical interface {
	MutateCreatePhysical(ctx context.Context, obj client.Object) (client.Object, error)
}

type MutateCreateVirtual

type MutateCreateVirtual interface {
	MutateCreateVirtual(ctx context.Context, obj client.Object) (client.Object, error)
}

type MutateDeletePhysical

type MutateDeletePhysical interface {
	MutateDeletePhysical(ctx context.Context, obj client.Object) (client.Object, error)
}

type MutateDeleteVirtual

type MutateDeleteVirtual interface {
	MutateDeleteVirtual(ctx context.Context, obj client.Object) (client.Object, error)
}

type MutateGetPhysical

type MutateGetPhysical interface {
	MutateGetPhysical(ctx context.Context, obj client.Object) (client.Object, error)
}

type MutateGetVirtual

type MutateGetVirtual interface {
	MutateGetVirtual(ctx context.Context, obj client.Object) (client.Object, error)
}

type MutateUpdatePhysical

type MutateUpdatePhysical interface {
	MutateUpdatePhysical(ctx context.Context, obj client.Object) (client.Object, error)
}

type MutateUpdateVirtual

type MutateUpdateVirtual interface {
	MutateUpdateVirtual(ctx context.Context, obj client.Object) (client.Object, error)
}

Jump to

Keyboard shortcuts

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