deleteEdge removes an edge from the map/list and returns it to the pool. Must be called holding lock.
(ele *list.Element)
| 89 | // deleteEdge removes an edge from the map/list and returns it to the pool. |
| 90 | // Must be called holding lock. |
| 91 | func (s *store) deleteEdge(ele *list.Element) { |
| 92 | edge := ele.Value.(*Edge) |
| 93 | delete(s.m, edge.key) |
| 94 | s.l.Remove(ele) |
| 95 | s.returnEdge(edge) |
| 96 | } |
| 97 | |
| 98 | // UpsertEdge fetches an Edge from the store and updates it using the given callback. If the Edge |
| 99 | // doesn't exist yet, it creates a new one with the default TTL. |
no test coverage detected