generic

package
v0.4.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteObject added in v0.3.0

func DeleteObject(ctx context.Context, localClient client.Client, pObj runtime.Object, log loghelper.Logger) (ctrl.Result, error)

func RegisterBackwardSyncer

func RegisterBackwardSyncer(ctx *context.ControllerContext, syncer Syncer, name string, modifyBuilder func(builder *builder.Builder) *builder.Builder) error

func RegisterFakeSyncer

func RegisterFakeSyncer(ctx *context.ControllerContext, syncer FakeSyncer, name string) error

func RegisterForwardSyncer

func RegisterForwardSyncer(ctx *context.ControllerContext, syncer Syncer, name string, modifyBuilder func(builder *builder.Builder) *builder.Builder) error

func RegisterOneWayClusterSyncer added in v0.4.0

func RegisterOneWayClusterSyncer(ctx *context.ControllerContext, clusterSyncer OneWayClusterSyncer, name string) error

func RegisterSyncer

func RegisterSyncer(ctx *context.ControllerContext, syncer Syncer, name string, options RegisterSyncerOptions) error

func RegisterSyncerIndices

func RegisterSyncerIndices(ctx *context.ControllerContext, obj client.Object) error

func RegisterTwoWayClusterSyncer added in v0.4.0

func RegisterTwoWayClusterSyncer(ctx *context.ControllerContext, clusterSyncer TwoWayClusterSyncer, name string) error

func RegisterTwoWayClusterSyncerIndices added in v0.4.0

func RegisterTwoWayClusterSyncerIndices(ctx *context.ControllerContext, obj client.Object, physicalName func(vName string, vObj runtime.Object) string) error

Types

type BackwardDelete added in v0.3.0

type BackwardDelete interface {
	BackwardDelete(ctx context.Context, pObj client.Object, log loghelper.Logger) (ctrl.Result, error)
}

type BackwardLifecycle

type BackwardLifecycle interface {
	BackwardStart(ctx context.Context, req ctrl.Request) (bool, error)
	BackwardEnd()
}

type BackwardUpdate

type BackwardUpdate interface {
	BackwardUpdate(ctx context.Context, pObj client.Object, vObj client.Object, log loghelper.Logger) (ctrl.Result, error)
	BackwardUpdateNeeded(pObj client.Object, vObj client.Object) (bool, error)
}

type FakeSyncer

type FakeSyncer interface {
	Object
	DependantObjectList() client.ObjectList
	NameFromDependantObject(ctx context.Context, obj client.Object) (types.NamespacedName, error)

	ReconcileStart(ctx context.Context, req ctrl.Request) (bool, error)
	ReconcileEnd()

	Create(ctx context.Context, name types.NamespacedName, log loghelper.Logger) error
	CreateNeeded(ctx context.Context, name types.NamespacedName) (bool, error)

	Delete(ctx context.Context, obj client.Object, log loghelper.Logger) error
	DeleteNeeded(ctx context.Context, obj client.Object) (bool, error)
}

type ForwardCreate

type ForwardCreate interface {
	ForwardCreate(ctx context.Context, vObj client.Object, log loghelper.Logger) (ctrl.Result, error)
	ForwardCreateNeeded(vObj client.Object) (bool, error)
}

type ForwardLifecycle

type ForwardLifecycle interface {
	ForwardStart(ctx context.Context, req ctrl.Request) (bool, error)
	ForwardEnd()
}

type ForwardUpdate added in v0.3.0

type ForwardUpdate interface {
	ForwardUpdate(ctx context.Context, pObj client.Object, vObj client.Object, log loghelper.Logger) (ctrl.Result, error)
	ForwardUpdateNeeded(pObj client.Object, vObj client.Object) (bool, error)
}

type Object

type Object interface {
	New() client.Object
	NewList() client.ObjectList
}

type OneWayClusterSyncer added in v0.4.0

type OneWayClusterSyncer interface {
	Object

	BackwardCreate(ctx context.Context, pObj client.Object, log loghelper.Logger) (ctrl.Result, error)
	BackwardCreateNeeded(pObj client.Object) (bool, error)
	BackwardUpdate
}

type RegisterSyncerOptions

type RegisterSyncerOptions struct {
	ModifyBackwardSyncer func(builder *builder.Builder) *builder.Builder
	ModifyForwardSyncer  func(builder *builder.Builder) *builder.Builder
}

type Syncer

type Syncer interface {
	Object

	ForwardCreate(ctx context.Context, vObj client.Object, log loghelper.Logger) (ctrl.Result, error)
	ForwardUpdate
	BackwardUpdate
}

type TwoWayClusterSyncer added in v0.4.0

type TwoWayClusterSyncer interface {
	Syncer
	translate.PhysicalNameTranslator

	IsManaged(pObj runtime.Object) bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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