feat: add peerstat package with Sink interface and NoopSink

This commit is contained in:
Jay
2026-05-19 13:47:17 -04:00
parent 1a7dd561b5
commit ce0b13e914
2 changed files with 36 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
package peerstat
import (
"testing"
)
func TestNoopSink(t *testing.T) {
// Test that NoopSink implements the Sink interface
var _ Sink = NoopSink{}
// Test that calling Record doesn't panic or crash
sink := NoopSink{}
sink.Record("peer1", "test event")
sink.Record("", nil)
// Test that it's a no-op (no assertions needed since it does nothing)
}