# Functions
CreateAttachHandler creates new web socket handler to handle terminal web socket.
DefaultUpgrader creates a new WebSocket upgrader with default buffer sizes and an origin check based on regex from an environment variable.
NewWebSocket creates a new WebSocket instance with the provided upgrader.
SendErrorMessage sends an error message to the WebSocket client.
Stream reads lines from the provided stream, formats each line using the given formatFunc, and sends them as WebSocket messages to the client connection until the context is done.
# Interfaces
WebSocketHandler defines an interface for registering a WebSocket connection.