package
0.2.3
Repository: https://github.com/kkrt-labs/go-utils.git
Documentation: pkg.go.dev

# Functions

NewClient creates a new websocket client - wsConn is the underlying websocket connection - decode is the function that is used to decode incoming messages.
NewDialer creates a new websocket.Dialer with the given configuration.
WithBaseURL is a DialerDecorator that sets the base URL for the websocket connection.
WithAuth is a DialerDecorator that wraps a websocket dialing error in an expresive error.
WithHeaders is a DialerDecorator that sets the headers for the websocket connection.
WithReadLimit is a DialerDecorator that sets the read limit for the websocket connection.

# Structs

Client is a client to a websocket server It is responsible for - sending and receiving messages to/from the server - handling ping/pong heartbeat to keep the connection alive.
ClientConfig is the configuration for the websocket client.
DialerConfig is a configuration for a websocket.Dialer.
IncomingMessage represents a message received from the server.

# Interfaces

Dialer is an interface for dialing a websocket connection.

# Type aliases

DialerDecorator is a function that decorates a Dialer.
DialerFunc is a function that implements the Dialer interface.