package
0.0.0-20241210072137-8149b9cdf2cb
Repository: https://github.com/dana-team/platform-backend.git
Documentation: pkg.go.dev

# 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.

# Structs

WebSocket struct holds the websocket.Upgrader.

# Interfaces

WebSocketHandler defines an interface for registering a WebSocket connection.