Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsClosedByClientError ¶
Return true if err is normal close connection error(connection close client). Return false otherwise. Note: In case if connection was close normally by client it's ok for us, we should not log error.
Types ¶
type ConnectionHandler ¶
type ConnectionHandler interface { // Add new websocket connection. ReadConnection(wsConn *websocket.Conn, inputChan chan []byte) // Send data to the client websocket connections. WriteDataToWsConnections(data []byte) // Close all connection. CloseConnections() }
Websocket connection handler is connection storage. For che-machine-exec it used to manage connections with exec input/output.
type ConnectionHandlerImpl ¶
type ConnectionHandlerImpl struct {
// contains filtered or unexported fields
}
Connection handler implementation.
func NewConnHandler ¶
func NewConnHandler() *ConnectionHandlerImpl
Create new implementation connection handler.
func (*ConnectionHandlerImpl) CloseConnections ¶
func (handler *ConnectionHandlerImpl) CloseConnections()
func (*ConnectionHandlerImpl) ReadConnection ¶
func (handler *ConnectionHandlerImpl) ReadConnection(wsConn *websocket.Conn, inputChan chan []byte)
Add new connection to handler.
func (*ConnectionHandlerImpl) WriteDataToWsConnections ¶
func (handler *ConnectionHandlerImpl) WriteDataToWsConnections(data []byte)
Write data to the all connections managed by handler.
Click to show internal directories.
Click to hide internal directories.