incorporate observer interface into components

This commit is contained in:
Jay
2026-05-19 21:20:00 -04:00
parent ce0b13e914
commit 30e9881dae
7 changed files with 118 additions and 78 deletions
+17
View File
@@ -0,0 +1,17 @@
package observer
import (
"testing"
)
func TestNullObserver(t *testing.T) {
// Test that NullObserver implements the Observer interface
var _ Observer = NullObserver{}
// Test that calling Record doesn't panic or crash
sink := NullObserver{}
sink.Record("peer1", "test event")
sink.Record("", nil)
// Test that it's a no-op (no assertions needed since it does nothing)
}