MCPcopy
hub / github.com/cloudflare/cloudflared / Remove

Method Remove

management/logger.go:76–92  ·  view source on GitHub ↗
(session *session)

Source from the content-addressed store, hash-verified

74}
75
76func (l *Logger) Remove(session *session) {
77 l.mu.Lock()
78 defer l.mu.Unlock()
79 index := -1
80 for i, v := range l.sessions {
81 if v == session {
82 index = i
83 break
84 }
85 }
86 if index == -1 {
87 // Not found
88 return
89 }
90 copy(l.sessions[index:], l.sessions[index+1:])
91 l.sessions = l.sessions[:len(l.sessions)-1]
92}
93
94// Write will write the log event to all sessions that have available capacity. For those that are full, the message
95// will be dropped.

Callers 2

Calls

no outgoing calls

Tested by 2