mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
feat add heap top
This commit is contained in:
parent
07b52ee24c
commit
1d49098954
@ -457,6 +457,10 @@ func (s *store) checkDir(parent *Node, dirName string) (*Node, *etcdErr.Error) {
|
||||
return n, nil
|
||||
}
|
||||
|
||||
func (s *store) MonitorTTLKeys() {
|
||||
|
||||
}
|
||||
|
||||
// Save function saves the static state of the store system.
|
||||
// Save function will not be able to save the state of watchers.
|
||||
// Save function will not save the parent field of the node. Or there will
|
||||
|
@ -48,6 +48,10 @@ func (h *ttlKeyHeap) Pop() interface{} {
|
||||
return x
|
||||
}
|
||||
|
||||
func (h *ttlKeyHeap) top() *Node {
|
||||
return h.array[0]
|
||||
}
|
||||
|
||||
func (h *ttlKeyHeap) pop() *Node {
|
||||
x := heap.Pop(h)
|
||||
n, _ := x.(*Node)
|
||||
|
Loading…
x
Reference in New Issue
Block a user