reconcile

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestFactory

type RequestFactory interface {
	// NewRestoreRequest Creates and initializes a RestoreRequest. The factory is
	// responsible for fetching the CassandraRestore, CassandraBackup, and
	// CassandraDatacenter objects from the api server. The factory returns a deep copy of
	// each of the objects, so there is no need to call DeepCopy() on them.
	// Reconciliation should proceed only if the returned Result is nil.
	NewRestoreRequest(ctx context.Context, restoreKey types.NamespacedName) (*RestoreRequest, *ctrl.Result, error)
}

func NewFactory

func NewFactory(client client.Client, logger logr.Logger) RequestFactory

type RestoreRequest

type RestoreRequest struct {
	Log logr.Logger

	Restore *api.CassandraRestore

	Backup *api.CassandraBackup

	Datacenter *cassdcapi.CassandraDatacenter
	// contains filtered or unexported fields
}

func (*RestoreRequest) DatacenterModified

func (r *RestoreRequest) DatacenterModified() bool

DatacenterModified returns true if the CassandraDatacenter.Spec has been modified.

func (*RestoreRequest) GetDatacenterPatch

func (r *RestoreRequest) GetDatacenterPatch() client.Patch

GetDatacenterPatch returns a patch that can be used to apply changes to the CassandraDatacenter. The patch is created when the RestoreRequest is initialized.

func (*RestoreRequest) GetRestorePatch

func (r *RestoreRequest) GetRestorePatch() client.Patch

GetRestorePatch returns a patch that can be used to apply changes to the CassandraRestore. The patch is created when the RestoreRequest is initialized.

func (*RestoreRequest) RestoreModified

func (r *RestoreRequest) RestoreModified() bool

RestoreModified returns true if the CassandraRestore.Status has been modified.

func (*RestoreRequest) SetDatacenterStoppedTime

func (r *RestoreRequest) SetDatacenterStoppedTime(t metav1.Time)

SetDatacenterStoppedTime sets the stop time.

func (*RestoreRequest) SetRestoreFinishTime

func (r *RestoreRequest) SetRestoreFinishTime(time metav1.Time)

func (*RestoreRequest) SetRestoreKey

func (r *RestoreRequest) SetRestoreKey(key string)

SetRestoreKey sets the key. Note that this function is idempotent.

func (*RestoreRequest) SetRestoreStartTime

func (r *RestoreRequest) SetRestoreStartTime(t metav1.Time)

SetRestoreStartTime sets the start time. Note that this function is idempotent.

Jump to

Keyboard shortcuts

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