Dave Protasowski
ee1db869c7
Update linter config and address lint warnings/failures ( #3068 )
...
* fix whitespace linter
* fix usestdlibvars
* fix staticheck
* ignore spancheck warning
* fix linter perfsprint
* fix nolintlint feedback
* fix nilerr lint checks
* fix misspell
* fix mirror lint
* fix intrange linter
* fix gofumpt linter
* fix gosec linter - ignore warning since default min tls version is 1.3
* fix gocritic linter
* fix whitespace
* fix fatcontext linter
* fix errorlint
* fix errname linter
* fix copyloopvar (go1.22) linter
* fix bodyclose linter
* update linter config
* add script to format code
* fix unit test
2024-06-25 14:49:36 +00:00
Dave Protasowski
8535fcc248
gofumpt the repo ( #3067 )
...
* gofumpt the repo
* don't prefix numbers with 0 - otherwise they're octal
2024-06-25 07:27:07 +00:00
Prashant Rewar
fef5da99bd
Replace all usages of deprecated wait.PollImmediate with wait.PollUntilContextTimeout ( #3004 )
...
Signed-off-by: Prashant Rewar <108176843+prashantrewar@users.noreply.github.com>
2024-04-02 14:44:03 +00:00
Victor Agababov
49e55c9eb8
Provide the information about why did the connection fail ( #1924 )
...
All the juicy details are in that http response,
the error is basically meaningless
2020-11-23 18:31:35 -08:00
Markus Thömmes
565516e224
Add errorlint and fix all existing issues ( #1855 )
2020-10-29 01:14:35 -07:00
Victor Agababov
a371418524
v2 ( #1754 )
2020-09-29 13:18:29 -07:00
Yanwei Guo
7f9b02e2c0
Add a func to return a connection which has been established ( #1729 )
...
* add sync func
* add comment
* Update websocket/connection.go
Co-authored-by: Victor Agababov <vagababov@gmail.com>
* reviews
Co-authored-by: Victor Agababov <vagababov@gmail.com>
2020-09-22 11:03:40 -07:00
Yanwei Guo
72aa424f98
expose ( #1684 )
2020-09-03 20:19:31 -07:00
Markus Thömmes
e9da10bc8a
Make test override pongTimeout correctly. ( #1665 )
...
* Make test override pongTimeout correctly.
* Reset pong timeout after test.
2020-08-31 02:46:08 -07:00
Victor Agababov
34838c4559
Remove all ClearAll calls from pkg UTs ( #1654 )
...
We need this in order to deprecate the function.
Serving is already free of those.
2020-08-27 13:13:07 -07:00
Julian Friedman
0c198ddb92
Add SendRaw to websocket client ( #1396 )
...
allows using non-gob encodings over the socket
2020-06-09 06:59:32 -07:00
Victor Agababov
74c5d67ea0
Fix the issues pointed out by staticcheck ( #541 )
...
* Fix the issues pointed out by staticcheck
* review fix
2019-07-23 13:13:36 -07:00
Matt Moore
222dd25986
Migrate pkg to use the knative.dev/pkg import path ( #489 )
...
* Manual changes.
* scripted changes.
2019-06-26 13:02:06 -07:00
Matt Moore
35a6f90d16
Sprinkle more ClearAll around to enabled -count=N ( #485 )
2019-06-23 19:24:02 -07:00
Matt Moore
fe25685384
Add a way to check the status of the websocket. ( #337 )
...
Related to: https://github.com/knative/serving/issues/3508
2019-03-25 08:41:50 -07:00
Markus Thömmes
00226b3943
Add ping message verification to the websocket connection. ( #269 )
...
* Add ping message verification to the websocket connection.
* Recycle ticker.
* Add comment.
* Fix datarace by waiting for goroutines to finish on Shutdown.
2019-02-12 09:05:43 -08:00
Markus Thömmes
3df885a8fc
Hardening the websocket client. ( #262 )
...
* Cleanup websocket connection, actually test reconnects.
* Some more cleanup.
* Locally define connFactory to avoid races.
* Move locks around, harden test.
* Add logging.
* Drop redundant target.
* Move message encoding outside of the writerLock.
* Fix assignment nit.
* Remove named return value.
* Add close signal to long-running loops.
* Add todo for returning a messageType.
* Bump header to 2019.
* Add note on draining the messageChan.
* Drop target from signature.
* Drop target from test.
* Add a more speaking example to draining the messageChan.
* Fix typo.
* Relax read lock, improve test.
* Bump test coverage.
* Add double shutdown test.
* Remove code duplication in test.
2019-02-08 09:51:41 -08:00
Markus Thömmes
fff36e41c6
Add durable websocket client from serving. ( #206 )
...
* Add durable websocket client from serving.
* Remove accidental bump.
* Finally used the update-deps.sh script for good.
2018-12-20 13:00:36 -08:00