Completed core connection wrapper.

This commit is contained in:
Jay
2026-01-26 09:56:53 -05:00
parent 346fde7592
commit 17fb1c6c9a
19 changed files with 2567 additions and 3 deletions

25
errors/errors.go Normal file
View File

@@ -0,0 +1,25 @@
package errors
import "errors"
import "fmt"
var (
// URL Errors
InvalidProtocol = errors.New("URL must use ws:// or wss:// scheme")
// Configuration Errors
InvalidReadTimeout = errors.New("read timeout must be positive")
InvalidWriteTimeout = errors.New("write timeout must be positive")
InvalidRetryMaxRetries = errors.New("max retry count cannot be negative")
InvalidRetryInitialDelay = errors.New("initial delay must be positive")
InvalidRetryMaxDelay = errors.New("max delay must be positive")
InvalidRetryJitterFactor = errors.New("jitter factor must be between 0.0 and 1.0")
)
func NewConfigError(text string) error {
return fmt.Errorf("configuration error: %s", text)
}
func NewConnectionError(text string) error {
return fmt.Errorf("connection error: %s", text)
}