syncer

package
v0.7.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteObject

func DeleteObject(ctx *synccontext.SyncContext, pObj client.Object) (ctrl.Result, error)

func RegisterFakeSyncer

func RegisterFakeSyncer(ctx *synccontext.RegisterContext, syncer FakeSyncer) error

func RegisterSyncer

func RegisterSyncer(ctx *synccontext.RegisterContext, syncer Syncer) error

Types

type ControllerModifier

type ControllerModifier interface {
	ModifyController(ctx *synccontext.RegisterContext, builder *builder.Builder) (*builder.Builder, error)
}

ControllerModifier is used to modify the created controller for the syncer

type FakeSyncer

type FakeSyncer interface {
	Object

	FakeSyncUp(ctx *synccontext.SyncContext, req types.NamespacedName) (ctrl.Result, error)
	FakeSync(ctx *synccontext.SyncContext, vObj client.Object) (ctrl.Result, error)
}

type IndicesRegisterer

type IndicesRegisterer interface {
	RegisterIndices(ctx *synccontext.RegisterContext) error
}

IndicesRegisterer registers additional indices for the controller

type Initializer

type Initializer interface {
	Init(registerContext *synccontext.RegisterContext) error
}

Initializer is used to create and update the prerequisites of the syncer before the controller is started

type Object

type Object interface {
	Name() string
	Resource() client.Object
}

type Starter

type Starter interface {
	ReconcileStart(ctx *synccontext.SyncContext, req ctrl.Request) (bool, error)
	ReconcileEnd()
}

type Syncer

type Syncer interface {
	Object
	translator.NameTranslator

	SyncDown(ctx *synccontext.SyncContext, vObj client.Object) (ctrl.Result, error)
	Sync(ctx *synccontext.SyncContext, pObj client.Object, vObj client.Object) (ctrl.Result, error)
}

type UpSyncer

type UpSyncer interface {
	SyncUp(ctx *synccontext.SyncContext, pObj client.Object) (ctrl.Result, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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