Documentation
¶
Index ¶
Constants ¶
View Source
const KEYS_PER_REQ = 1000
Variables ¶
View Source
var AdvancedObjectFilter pipeline.StepFn = func(group *pipeline.Group, stepNum int, input <-chan *storage.Object, output chan<- *storage.Object, errChan chan<- error) { for obj := range input { destObj := &storage.Object{ Key: obj.Key, VersionId: obj.VersionId, } err := group.Target.GetObjectMeta(destObj) if err != nil || obj.ETag == nil { output <- obj continue } if destObj.ETag != nil && *obj.ETag == *destObj.ETag { continue } if origETag, ok := destObj.Metadata["X-Original-Etag"]; ok && origETag != nil && *obj.ETag == *origETag { continue } output <- obj } }
FilterObjectsModified accepts an input object and checks if it matches the filter This filter read object meta from target storage and compare object ETags. If Etags are equal object will be skipped For FS storage xattr support are required for proper work.
View Source
var AnnotateETag pipeline.StepFn = func(group *pipeline.Group, stepNum int, input <-chan *storage.Object, output chan<- *storage.Object, errChan chan<- error) { for obj := range input { if obj.ETag != nil { if obj.Metadata == nil { obj.Metadata = make(map[string]*string) } obj.Metadata["X-Original-Etag"] = obj.ETag } output <- obj } }
Functions ¶
Types ¶
type SyncGroup ¶
func PrepareSyncGroup ¶
func PrepareSyncGroup( ctx context.Context, source *kubernetes.BucketDetails, sourceEndpoint string, target *kubernetes.BucketDetails, targetEndpoint string, numWorkers int, retryFiles []*storage.Object, ) (*SyncGroup, error)
Click to show internal directories.
Click to hide internal directories.