RemoveDescriptors removes all descriptors that match the provided matcher. It does so in a parallel-access-safe way
(matcher match.Matcher)
| 504 | // RemoveDescriptors removes all descriptors that match the provided matcher. |
| 505 | // It does so in a parallel-access-safe way |
| 506 | func (p *Provider) RemoveDescriptors(matcher match.Matcher) error { |
| 507 | // get our lock |
| 508 | if err := p.Lock(); err != nil { |
| 509 | return fmt.Errorf("unable to lock cache for removing descriptors: %v", err) |
| 510 | } |
| 511 | defer p.Unlock() |
| 512 | |
| 513 | return p.cache.RemoveDescriptors(matcher) |
| 514 | } |
no test coverage detected