v0.7.0 4c16dd8

export_test.go RawHistoryFolder

1package brokeripc
2
3import (
4	"github.com/bnema/vev/internal/adapters/ipc"
5)
6
7// Test-only accessors (export_test.go pattern): these observe listener
8// internals that only this package's own tests need. They are kept out of
9// the production build so a live server's diagnostics or capacity never
10// depend on a test-only accessor.
11
12// refusal reports the most recent accept refusal, or nil if the listener has
13// refused nothing yet.
14func (l *listener) refusal() error {
15	l.mu.Lock()
16	defer l.mu.Unlock()
17	return l.lastRefuse
18}
19
20// inFlight reports the count of accepted carriages still completing their
21// handshake.
22func (l *listener) inFlight() int {
23	l.mu.Lock()
24	defer l.mu.Unlock()
25	return len(l.pending)
26}
27
28// liveSessions reports the count of admitted, still-open sessions.
29func (l *listener) liveSessions() int {
30	l.mu.Lock()
31	defer l.mu.Unlock()
32	return len(l.sessions)
33}
34
35// DefaultSocketPath returns the broker endpoint path under SocketFileName's
36// convenience default runtime directory, for tests that need it without
37// composing SocketPath(SocketDir()) themselves.
38func DefaultSocketPath() string { return SocketPath(SocketDir()) }
39
40// SocketDir returns the per-user directory the broker endpoint belongs in:
41// $XDG_RUNTIME_DIR/vev when set, else /run/user/<uid>/vev when that directory
42// exists, else /tmp/vev-<uid>. It is the daemon's per-user runtime directory as
43// well, so both endpoints share one owner-only directory while keeping
44// distinct socket names.
45func SocketDir() string { return ipc.SocketDir() }

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close