MCPcopy Create free account
hub / github.com/RTradeLtd/Lens / Remove

Method Remove

engine/engine.go:217–227  ·  view source on GitHub ↗

Remove deletes an indexed object from the engine

(hash string)

Source from the content-addressed store, hash-verified

215
216// Remove deletes an indexed object from the engine
217func (e *Engine) Remove(hash string) error {
218 if !e.IsIndexed(hash) {
219 return fmt.Errorf("no document '%s' in index", hash)
220 }
221 if e.q.IsStopped() {
222 e.l.Warnw("queue stopped - waiting and trying again",
223 "hash", hash)
224 time.Sleep(3 * time.Second)
225 }
226 return e.q.Queue(&queue.Item{Key: hash, Val: nil})
227}
228
229// Close shuts down the engine
230func (e *Engine) Close() {

Callers

nothing calls this directly

Calls 3

IsIndexedMethod · 0.95
IsStoppedMethod · 0.80
QueueMethod · 0.80

Tested by

no test coverage detected