MCPcopy Create free account
hub / github.com/PasarGuard/node / add

Method add

backend/xray/startup_diagnostics.go:37–47  ·  view source on GitHub ↗
(line string)

Source from the content-addressed store, hash-verified

35}
36
37func (r *startupLogRing) add(line string) {
38 if len(r.lines) == 0 {
39 return
40 }
41
42 r.lines[r.next] = line
43 r.next = (r.next + 1) % len(r.lines)
44 if r.next == 0 {
45 r.full = true
46 }
47}
48
49func (r *startupLogRing) tail(n int) []string {
50 count := r.next

Callers 3

RecordStartupLogMethod · 0.80
RecordRuntimeLogMethod · 0.80
TestStartupLogRingTailFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestStartupLogRingTailFunction · 0.64