sync

package
v0.0.0-...-be4e7bc Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: EPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetObjectType

func GetObjectType(obj interface{}) string

Types

type ObjSyncer

type ObjSyncer struct {
	Syncer
	// contains filtered or unexported fields
}

func (*ObjSyncer) CreateIgnoreIfExists

func (s *ObjSyncer) CreateIgnoreIfExists(blueprint client.Object) (bool, error)

func (*ObjSyncer) Delete

func (s *ObjSyncer) Delete(key client.ObjectKey, objectMeta client.Object) (bool, error)

func (*ObjSyncer) Get

func (s *ObjSyncer) Get(key client.ObjectKey, actual client.Object) (bool, error)

func (*ObjSyncer) Sync

func (s *ObjSyncer) Sync(blueprint client.Object, diffOpts ...cmp.Option) (bool, error)

type Syncer

type Syncer interface {
	// Get reads object.
	// Returns true if object exists otherwise returns false.
	// Returns error if object cannot be retrieved otherwise returns nil.
	Get(key client.ObjectKey, actual client.Object) (bool, error)
	// CreateIgnoreIfExists creates object.
	// Set owner reference for Eclipse Che namespace objects.
	// Return true if a new object is created or object already exists, otherwise returns false.
	// Returns error if object cannot be created otherwise returns nil.
	CreateIgnoreIfExists(blueprint client.Object) (bool, error)
	// Delete deletes object.
	// Returns true if object deleted or not found otherwise returns false.
	// Returns error if object cannot be deleted otherwise returns nil.
	Delete(key client.ObjectKey, objectMeta client.Object) (bool, error)
	// Sync syncs the blueprint to the cluster in a generic (as much as Go allows) manner.
	// Returns true if object is up-to-date otherwise returns false
	// Returns error if object cannot be created/updated otherwise returns nil.
	Sync(blueprint client.Object, diffOpts ...cmp.Option) (bool, error)
}

Jump to

Keyboard shortcuts

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