MCPcopy Create free account
hub / github.com/diillson/chatcli / AddLogs

Method AddLogs

k8s/store.go:48–56  ·  view source on GitHub ↗

AddLogs adds log entries to the store.

(entries []LogEntry)

Source from the content-addressed store, hash-verified

46
47// AddLogs adds log entries to the store.
48func (s *ObservabilityStore) AddLogs(entries []LogEntry) {
49 s.mu.Lock()
50 defer s.mu.Unlock()
51
52 s.logs = append(s.logs, entries...)
53 if len(s.logs) > s.maxLogs {
54 s.logs = s.logs[len(s.logs)-s.maxLogs:]
55 }
56}
57
58// AddAlert adds an alert to the store. Duplicates (same Type+Object) are skipped
59// to prevent alert accumulation from repeated poll cycles detecting the same condition.

Callers 8

TestAddLogsFunction · 0.95
TestGetErrorLogsFunction · 0.95
TestStatsFunction · 0.95
collectMethod · 0.80

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by 7

TestAddLogsFunction · 0.76
TestGetErrorLogsFunction · 0.76
TestStatsFunction · 0.76