Documentation ¶
Index ¶
- type BundleRegisterable
- type ControlInfoDBSyncer
- type DBSyncer
- func NewControlInfoDBSyncer(log logr.Logger) DBSyncer
- func NewHubClusterInfoDBSyncer(log logr.Logger) DBSyncer
- func NewLocalPoliciesStatusEventSyncer(log logr.Logger, config *corev1.ConfigMap) DBSyncer
- func NewLocalSpecPlacementruleSyncer(log logr.Logger, config *corev1.ConfigMap) DBSyncer
- func NewLocalSpecPoliciesSyncer(log logr.Logger, config *corev1.ConfigMap) DBSyncer
- func NewManagedClustersDBSyncer(log logr.Logger) DBSyncer
- func NewPlacementDecisionsDBSyncer(log logr.Logger) DBSyncer
- func NewPlacementRulesDBSyncer(log logr.Logger) DBSyncer
- func NewPlacementsDBSyncer(log logr.Logger) DBSyncer
- func NewPoliciesDBSyncer(log logr.Logger, config *corev1.ConfigMap) DBSyncer
- func NewSubscriptionReportsDBSyncer(log logr.Logger) DBSyncer
- func NewSubscriptionStatusesDBSyncer(log logr.Logger) DBSyncer
- type LocalSpecDBSyncer
- type ManagedClustersDBSyncer
- type PoliciesDBSyncer
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 ¶
NewControlInfoDBSyncer creates a new instance of ControlInfoDBSyncer.
func NewHubClusterInfoDBSyncer ¶
NewHubClusterInfoDBSyncer creates a new instance of genericDBSyncer to sync hub cluster info.
func NewLocalSpecPlacementruleSyncer ¶
NewLocalSpecPlacementruleSyncer creates a new instance of LocalSpecDBSyncer.
func NewLocalSpecPoliciesSyncer ¶
NewLocalSpecPoliciesSyncer creates a new instance of LocalSpecDBSyncer.
func NewManagedClustersDBSyncer ¶
NewManagedClustersDBSyncer creates a new instance of ManagedClustersDBSyncer.
func NewPlacementDecisionsDBSyncer ¶
NewPlacementDecisionsDBSyncer creates a new instance of genericDBSyncer to sync placement-decisions.
func NewPlacementRulesDBSyncer ¶
NewPlacementRulesDBSyncer creates a new instance of genericDBSyncer to sync placement-rules.
func NewPlacementsDBSyncer ¶
NewPlacementsDBSyncer creates a new instance of genericDBSyncer to sync placements.
func NewPoliciesDBSyncer ¶
NewPoliciesDBSyncer creates a new instance of PoliciesDBSyncer.
func NewSubscriptionReportsDBSyncer ¶
NewSubscriptionReportsDBSyncer creates a new instance of genericDBSyncer to sync subscription-reports.
func NewSubscriptionStatusesDBSyncer ¶
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.
Source Files ¶
- control_info_db_syncer.go
- db_syncer.go
- generic_db_syncer.go
- hub_cluster_info_db_syncer.go
- local_spec_placementrule_syncer.go
- local_spec_policies_syncer.go
- local_status_policies_syncer.go
- log_helpers.go
- managed_clusters_syncer.go
- placement_decisions_db_syncer.go
- placement_rules_db_syncer.go
- placements_db_syncer.go
- policies_db_syncer.go
- subscription_reports_db_syncer.go
- subscription_status_db_syncer.go