Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceSyncer ¶
type ResourceSyncer interface {
// Sync method takes 'upstream' as a basis and synchronize underlying store.
// It deletes all resources that absent in '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(upstream model.ResourceList, fs ...SyncOptionFunc) error
}
ResourceSyncer allows to synchronize resources in Store
func NewResourceSyncer ¶
func NewResourceSyncer(log logr.Logger, resourceStore store.ResourceStore) ResourceSyncer
type SyncOption ¶
type SyncOption struct {
Predicate func(r 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 model.Resource) bool) SyncOptionFunc
Click to show internal directories.
Click to hide internal directories.