errors

package
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrHandleMessage is returned when the WebSocketDataHandler cannot handle a
	// message. This can occur if the handler is not configured to handle the given
	// message. Handlers must be able to handle heartbeat messages.
	ErrHandleMessage = errors.New("websocket data handler failed to handle message")

	// ErrCreateMessages is returned when the WebSocketDataHandler cannot create a
	// subscription messages. This can occur if the handler is not configured to
	// handle the given ids.
	ErrCreateMessages = errors.New("websocket data handler failed to create messages")

	// ErrRead is returned when the WebSocketConnHandler cannot read a message.
	ErrRead = errors.New("websocket connection handler failed to read message")

	// ErrWrite is returned when the WebSocketConnHandler cannot write a message.
	ErrWrite = errors.New("websocket connection handler failed to write message")

	// ErrClose is returned when the WebSocketConnHandler cannot close the connection.
	ErrClose = errors.New("websocket connection handler failed to close connection")

	// ErrDial is returned when the WebSocketConnHandler cannot create a connection.
	ErrDial = errors.New("websocket connection handler failed to create connection")
)

Functions

func ErrCloseWithErr

func ErrCloseWithErr(err error) error

ErrCloseWithErr is used to create a new ErrClose with the given error. Provider's that implement the WebSocketConnHandler interface should use this function to create the error.

func ErrCreateMessageWithErr

func ErrCreateMessageWithErr(err error) error

ErrCreateMessageWithErr is used to create a new ErrCreateMessages with the given error. Provider's that implement the WebSocketDataHandler interface should use this function to create the error.

func ErrDialWithErr

func ErrDialWithErr(err error) error

ErrDialWithErr is used to create a new ErrCreate with the given error. Provider's that implement the WebSocketConnHandler interface should use this function to create the error.

func ErrHandleMessageWithErr

func ErrHandleMessageWithErr(err error) error

ErrHandleMessageWithErr is used to create a new ErrHandleMessage with the given error. Provider's that implement the WebSocketDataHandler interface should use this function to create the error.

func ErrReadWithErr

func ErrReadWithErr(err error) error

ErrReadWithErr is used to create a new ErrRead with the given error. Provider's that implement the WebSocketConnHandler interface should use this function to create the error.

func ErrWriteWithErr

func ErrWriteWithErr(err error) error

ErrWriteWithErr is used to create a new ErrWrite with the given error. Provider's that implement the WebSocketConnHandler interface should use this function to create the error.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL