Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GlobalSyncCallback ¶
func GlobalSyncCallback( ctx context.Context, syncer ResourceSyncer, k8sStore bool, kubeFactory resources_k8s.KubeFactory, systemNamespace string, ) *client.Callbacks
func ZoneSyncCallback ¶
func ZoneSyncCallback(ctx context.Context, configToSync map[string]bool, syncer ResourceSyncer, k8sStore bool, localZone string, kubeFactory resources_k8s.KubeFactory, systemNamespace string) *client.Callbacks
Types ¶
type ResourceSyncer ¶
type ResourceSyncer interface {
// Sync method takes 'upstream' as a basis and synchronize underlying store.
// It deletes resources that were removed in the upstream, creates new resources that
// are not represented in store yet and updates the rest.
// Using 'PrefilterBy' option Sync allows to select scope of resources that will be
// affected by Sync
//
// Sync takes into account only 'Name' and 'Mesh' when it comes to upstream's Meta.
// 'Version', 'CreationTime' and 'ModificationTime' are managed by downstream store.
Sync(ctx context.Context, upstream client.UpstreamResponse, fs ...SyncOptionFunc) error
}
ResourceSyncer allows to synchronize resources in Store
func NewResourceSyncer ¶
func NewResourceSyncer( log logr.Logger, resourceStore core_manager.ResourceManager, transactions store.Transactions, extensions context.Context, ) (ResourceSyncer, error)
type SyncOption ¶
type SyncOption struct {
Predicate func(r core_model.Resource) bool
Zone string
}
func NewSyncOptions ¶
func NewSyncOptions(fs ...SyncOptionFunc) *SyncOption
type SyncOptionFunc ¶
type SyncOptionFunc func(*SyncOption)
func PrefilterBy ¶
func PrefilterBy(predicate func(r core_model.Resource) bool) SyncOptionFunc
func Zone ¶
func Zone(name string) SyncOptionFunc
Click to show internal directories.
Click to hide internal directories.