Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/garethgeorge/backrest
/ Peek
Method
Peek
internal/queue/timequeue.go:44–53 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
42
}
43
44
func
(t *TimeQueue[T]) Peek() T {
45
t.mu.Lock()
46
defer
t.mu.Unlock()
47
48
if
t.heap.Len() == 0 {
49
var
zero T
50
return
zero
51
}
52
return
t.heap.Peek().v
53
}
54
55
func
(t *TimeQueue[T]) Reset() []T {
56
t.mu.Lock()
Callers
1
Dequeue
Method · 0.45
Calls
3
Lock
Method · 0.80
Unlock
Method · 0.45
Len
Method · 0.45
Tested by
no test coverage detected