MCPcopy
hub / github.com/wal-g/wal-g / FindTargetByName

Method FindTargetByName

internal/delete_handler.go:238–242  ·  view source on GitHub ↗
(bname string)

Source from the content-addressed store, hash-verified

236}
237
238func (h *DeleteHandler) FindTargetByName(bname string) (BackupObject, error) {
239 return findTarget(h.backups, h.greater, func(object BackupObject) bool {
240 return strings.HasPrefix(object.GetName(), bname)
241 })
242}
243
244// TODO: unit tests
245func (h *DeleteHandler) FindTargetBySelector(targetSelector BackupSelector) (BackupObject, error) {

Callers 7

HandleDeleteGarbageMethod · 0.95
HandleDeleteGarbageMethod · 0.95
TestFindTargetByNameFunction · 0.80
DeleteMethod · 0.80
DeleteMethod · 0.80

Calls 2

findTargetFunction · 0.85
GetNameMethod · 0.65

Tested by 3

TestFindTargetByNameFunction · 0.64