dbsyncer

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleRegisterable

type BundleRegisterable interface {
	BundleRegister(*registration.BundleRegistration)
}

type ControlInfoDBSyncer

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

ControlInfoDBSyncer implements control info transport to db sync.

func (*ControlInfoDBSyncer) RegisterBundleHandlerFunctions

func (syncer *ControlInfoDBSyncer) RegisterBundleHandlerFunctions(
	conflationManager *conflator.ConflationManager,
)

RegisterBundleHandlerFunctions registers bundle handler functions within the conflation manager.

func (*ControlInfoDBSyncer) RegisterCreateBundleFunctions

func (syncer *ControlInfoDBSyncer) RegisterCreateBundleFunctions(transportDispatcher BundleRegisterable)

RegisterCreateBundleFunctions registers create bundle functions within the transport instance.

type DBSyncer

type DBSyncer interface {
	// RegisterCreateBundleFunctions registers create bundle functions within the transport instance.
	RegisterCreateBundleFunctions(bundleRegisterable BundleRegisterable)
	// RegisterBundleHandlerFunctions registers bundle handler functions within the conflation manager.
	RegisterBundleHandlerFunctions(conflationManager *conflator.ConflationManager)
}

DBSyncer interface for registering business logic needed for handling bundles.

func NewControlInfoDBSyncer

func NewControlInfoDBSyncer(log logr.Logger) DBSyncer

NewControlInfoDBSyncer creates a new instance of ControlInfoDBSyncer.

func NewHubClusterInfoDBSyncer

func NewHubClusterInfoDBSyncer(log logr.Logger) DBSyncer

NewHubClusterInfoDBSyncer creates a new instance of genericDBSyncer to sync hub cluster info.

func NewLocalPoliciesStatusEventSyncer

func NewLocalPoliciesStatusEventSyncer(log logr.Logger, config *corev1.ConfigMap) DBSyncer

func NewLocalSpecPlacementruleSyncer

func NewLocalSpecPlacementruleSyncer(log logr.Logger, config *corev1.ConfigMap) DBSyncer

NewLocalSpecPlacementruleSyncer creates a new instance of LocalSpecDBSyncer.

func NewLocalSpecPoliciesSyncer

func NewLocalSpecPoliciesSyncer(log logr.Logger, config *corev1.ConfigMap) DBSyncer

NewLocalSpecPoliciesSyncer creates a new instance of LocalSpecDBSyncer.

func NewManagedClustersDBSyncer

func NewManagedClustersDBSyncer(log logr.Logger) DBSyncer

NewManagedClustersDBSyncer creates a new instance of ManagedClustersDBSyncer.

func NewPlacementDecisionsDBSyncer

func NewPlacementDecisionsDBSyncer(log logr.Logger) DBSyncer

NewPlacementDecisionsDBSyncer creates a new instance of genericDBSyncer to sync placement-decisions.

func NewPlacementRulesDBSyncer

func NewPlacementRulesDBSyncer(log logr.Logger) DBSyncer

NewPlacementRulesDBSyncer creates a new instance of genericDBSyncer to sync placement-rules.

func NewPlacementsDBSyncer

func NewPlacementsDBSyncer(log logr.Logger) DBSyncer

NewPlacementsDBSyncer creates a new instance of genericDBSyncer to sync placements.

func NewPoliciesDBSyncer

func NewPoliciesDBSyncer(log logr.Logger, config *corev1.ConfigMap) DBSyncer

NewPoliciesDBSyncer creates a new instance of PoliciesDBSyncer.

func NewSubscriptionReportsDBSyncer

func NewSubscriptionReportsDBSyncer(log logr.Logger) DBSyncer

NewSubscriptionReportsDBSyncer creates a new instance of genericDBSyncer to sync subscription-reports.

func NewSubscriptionStatusesDBSyncer

func NewSubscriptionStatusesDBSyncer(log logr.Logger) DBSyncer

NewSubscriptionStatusesDBSyncer creates a new instance of genericDBSyncer to sync subscription-statuses.

type LocalSpecDBSyncer

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

LocalSpecDBSyncer implements local objects spec db sync business logic.

func (*LocalSpecDBSyncer) RegisterBundleHandlerFunctions

func (syncer *LocalSpecDBSyncer) RegisterBundleHandlerFunctions(conflationManager *conflator.ConflationManager)

RegisterBundleHandlerFunctions registers bundle handler functions within the conflation manager. handler functions need to do "diff" between objects received in the bundle and the objects in database. leaf hub sends only the current existing objects, and status transport bridge should understand implicitly which objects were deleted. therefore, whatever is in the db and cannot be found in the bundle has to be deleted from the database. for the objects that appear in both, need to check if something has changed using resourceVersion field comparison and if the object was changed, update the db with the current object.

func (*LocalSpecDBSyncer) RegisterCreateBundleFunctions

func (syncer *LocalSpecDBSyncer) RegisterCreateBundleFunctions(transportDispatcher BundleRegisterable)

RegisterCreateBundleFunctions registers create bundle functions within the transport instance.

type ManagedClustersDBSyncer

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

ManagedClustersDBSyncer implements managed clusters db sync business logic.

func (*ManagedClustersDBSyncer) RegisterBundleHandlerFunctions

func (syncer *ManagedClustersDBSyncer) RegisterBundleHandlerFunctions(conflationManager *conflator.ConflationManager)

RegisterBundleHandlerFunctions registers bundle handler functions within the conflation manager. handler function need to do "diff" between objects received in the bundle and the objects in database. leaf hub sends only the current existing objects, and status transport bridge should understand implicitly which objects were deleted. therefore, whatever is in the db and cannot be found in the bundle has to be deleted from the database. for the objects that appear in both, need to check if something has changed using resourceVersion field comparison and if the object was changed, update the db with the current object.

func (*ManagedClustersDBSyncer) RegisterCreateBundleFunctions

func (syncer *ManagedClustersDBSyncer) RegisterCreateBundleFunctions(dispatcher BundleRegisterable)

RegisterCreateBundleFunctions registers create bundle functions within the transport instance.

type PoliciesDBSyncer

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

PoliciesDBSyncer implements policies db sync business logic.

func (*PoliciesDBSyncer) RegisterBundleHandlerFunctions

func (syncer *PoliciesDBSyncer) RegisterBundleHandlerFunctions(conflationManager *conflator.ConflationManager)

RegisterBundleHandlerFunctions registers bundle handler functions within the conflation manager. handler functions need to do "diff" between objects received in the bundle and the objects in database. leaf hub sends only the current existing objects, and status transport bridge should understand implicitly which objects were deleted. therefore, whatever is in the db and cannot be found in the bundle has to be deleted from the database. for the objects that appear in both, need to check if something has changed using resourceVersion field comparison and if the object was changed, update the db with the current object.

func (*PoliciesDBSyncer) RegisterCreateBundleFunctions

func (syncer *PoliciesDBSyncer) RegisterCreateBundleFunctions(transportDispatcher BundleRegisterable)

RegisterCreateBundleFunctions registers create bundle functions within the transport instance.

Jump to

Keyboard shortcuts

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