Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurryWsMockUpgrader ¶
func CurryWsMockUpgrader(tb testing.TB, wsHandler WsMockFunc) http.HandlerFunc
CurryWsMockUpgrader curries a WsMockUpgrader with a testing.TB and a mock func bridging the gap between information known before the Server is created and during a request
func EchoHandler ¶
EchoHandler is a simple echo function after a read, this doesn't need to worry if writing to the connection fails
func WsMockUpgrader ¶
func WsMockUpgrader(tb testing.TB, w http.ResponseWriter, r *http.Request, wsHandler WsMockFunc)
WsMockUpgrader handles upgrading an initial HTTP request to WS, and then runs a for loop calling the mock func on each input
Types ¶
Click to show internal directories.
Click to hide internal directories.