cleanup and refactors

This commit is contained in:
Jay
2026-05-20 22:49:25 -04:00
parent cda6d286ab
commit f1afca7921
10 changed files with 628 additions and 496 deletions
+9 -1
View File
@@ -9,12 +9,16 @@ import (
"time"
)
// Re-exported types for consumer convenience
// ----------------------------------------------------------------------------
// Re-exports
// ----------------------------------------------------------------------------
type Socket = types.Socket
type Dialer = types.Dialer
// ----------------------------------------------------------------------------
// Dialer Mocks
// ----------------------------------------------------------------------------
type MockDialer struct {
DialContextFunc func(
@@ -28,7 +32,9 @@ func (m *MockDialer) DialContext(
return m.DialContextFunc(ctx, url, h)
}
// ----------------------------------------------------------------------------
// Socket Mocks
// ----------------------------------------------------------------------------
type MockSocket struct {
WriteMessageFunc func(int, []byte) error
@@ -93,7 +99,9 @@ func (m *MockSocket) SetPongHandler(h func(s string) error) {
m.SetPongHandlerFunc(h)
}
// ----------------------------------------------------------------------------
// Logging mocks
// ----------------------------------------------------------------------------
type MockSlogHandler struct {
records *[]slog.Record