generic

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 20 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 client.Object, log loghelper.Logger) (ctrl.Result, error)

func RegisterFakeSyncerWithOptions added in v0.4.4

func RegisterFakeSyncerWithOptions(ctx *context2.ControllerContext, name string, syncer FakeSyncer, options *SyncerOptions) error

func RegisterSyncer

func RegisterSyncer(ctx *context2.ControllerContext, name string, syncer Syncer) error

func RegisterSyncerIndices

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

func RegisterSyncerWithOptions added in v0.4.4

func RegisterSyncerWithOptions(ctx *context2.ControllerContext, name string, syncer Syncer, options *SyncerOptions) error

Types

type BackwardSyncer added in v0.4.4

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

type FakeSyncer

type FakeSyncer interface {
	Object

	Create(ctx context.Context, req types.NamespacedName, log loghelper.Logger) (ctrl.Result, error)
	Update(ctx context.Context, vObj client.Object, log loghelper.Logger) (ctrl.Result, error)
}

type GenericCreator added in v0.4.4

type GenericCreator struct {
	// contains filtered or unexported fields
}

func NewGenericCreator added in v0.4.4

func NewGenericCreator(localClient client.Client, eventRecorder record.EventRecorder, name string) *GenericCreator

func (*GenericCreator) Create added in v0.4.4

func (g *GenericCreator) Create(ctx context.Context, vObj, pObj client.Object, log loghelper.Logger) (ctrl.Result, error)

func (*GenericCreator) Update added in v0.4.4

func (g *GenericCreator) Update(ctx context.Context, vObj, pObj client.Object, log loghelper.Logger) (ctrl.Result, error)

type Object

type Object interface {
	New() client.Object
}

type Starter added in v0.4.4

type Starter interface {
	ReconcileStart(ctx context.Context, req ctrl.Request) (bool, error)
	ReconcileEnd()
}

type Syncer

type Syncer interface {
	Object
	Translator

	Forward(ctx context.Context, vObj client.Object, log loghelper.Logger) (ctrl.Result, error)
	Update(ctx context.Context, pObj client.Object, vObj client.Object, log loghelper.Logger) (ctrl.Result, error)
}

type SyncerOptions added in v0.4.4

type SyncerOptions struct {
	ModifyController        func(builder *builder.Builder) *builder.Builder
	MaxConcurrentReconciles int
}

type Translator added in v0.4.4

type Translator interface {
	IsManaged(pObj client.Object) (bool, error)

	VirtualToPhysical(req types.NamespacedName, vObj client.Object) types.NamespacedName
	PhysicalToVirtual(pObj client.Object) types.NamespacedName
}

func NewClusterTranslator added in v0.4.4

func NewClusterTranslator(physicalNamespace string, virtualClient client.Client, obj client.Object, nameTranslator translate.PhysicalNameTranslator) Translator

func NewNamespacedTranslator added in v0.4.4

func NewNamespacedTranslator(physicalNamespace string, virtualClient client.Client, obj client.Object) Translator

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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