@@ -1,7 +1,6 @@
package store
import (
- "container/heap"
"path"
"sort"
"sync"
@@ -387,7 +386,7 @@ func (n *Node) UpdateTTL(expireTime time.Time) {
if !expireTime.IsZero() {
// from permanent to ttl
// push into ttl heap
- heap.Push(n.store.TTLKeyHeap, n)
+ n.store.TTLKeyHeap.push(n)
}
"encoding/json"
"fmt"
@@ -394,7 +393,7 @@ func (s *store) internalCreate(nodePath string, value string, unique bool, repla
// Node with TTL
if !n.IsPermanent() {
- heap.Push(s.TTLKeyHeap, n)
+ s.TTLKeyHeap.push(n)
n.Expire()
e.Expiration, e.TTL = n.ExpirationAndTTL()