Documentation
¶
Index ¶
- Variables
- func EstablishNodeConn(nodeID string, wsConnection chan *websocket.Conn, messages chan Message, ...)
- func SendRequestToNode(connToLoadbalancer *websocket.Conn, connToNode *websocket.Conn, ...)
- func SendResponseToClient(connToLoadbalancer *websocket.Conn, connToNode *websocket.Conn, ...)
- type ConnectionError
- type ConnectionErrorType
- type Message
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ShortHandshakeTimeout = 2 * time.Second
)
Functions ¶
func EstablishNodeConn ¶
func EstablishNodeConn(nodeID string, wsConnection chan *websocket.Conn, messages chan Message, connErr chan *ConnectionError)
EstablishNodeConn dials node, pipes messages to message channel and returns connection to wsConnection channel
Types ¶
type ConnectionError ¶
type ConnectionError struct { Err error Type ConnectionErrorType }
func (*ConnectionError) Error ¶
func (r *ConnectionError) Error() string
func (*ConnectionError) IsNodeError ¶
func (r *ConnectionError) IsNodeError() bool
type ConnectionErrorType ¶
type ConnectionErrorType int
const ( NodeError ConnectionErrorType = iota PortPoolError )
Click to show internal directories.
Click to hide internal directories.