Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websocket/gateio: Add request functions for websocket multi-connection [SPOT] #1598

Merged
merged 173 commits into from
Dec 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
64c24ab
gateio: Add multi asset websocket support WIP.
Jul 14, 2024
f509399
meow
Jul 14, 2024
feed04e
Add tests and shenanigans
Jul 15, 2024
31a26c0
integrate flushing and for enabling/disabling pairs from rpc shenanigans
Jul 15, 2024
e1f2f7a
some changes
Jul 15, 2024
76524cc
linter: fixes strikes again.
Jul 15, 2024
640e82e
Change name ConnectionAssociation -> ConnectionCandidate for better c…
Jul 15, 2024
3a0440d
Add subscription tests (state functional)
Jul 16, 2024
c7d2b62
glorious:nits + proxy handling
Jul 16, 2024
fc281ee
Spelling
Jul 16, 2024
eaa44ba
linter: fixerino
Jul 16, 2024
a8debf9
instead of nil, dont do nil.
Jul 16, 2024
16b0e22
clean up nils
Jul 16, 2024
32252b2
cya nils
Jul 16, 2024
7c5d9c3
don't need to set URL or check if its running
Jul 17, 2024
2f93b64
stream match update
Jul 17, 2024
dd94e4e
update tests
Jul 17, 2024
ca597f3
linter: fix
Jul 17, 2024
2e0f0ae
glorious: nits + handle context cancellations
Jul 18, 2024
2d2f872
stop ping handler routine leak
Jul 19, 2024
39191c8
* Fix bug where reader routine on error that is not a disconnection e…
Jul 19, 2024
f1c3895
Allow rollback on connect on any error across all connections
Jul 19, 2024
09bff6c
fix shadow jutsu
Jul 19, 2024
e66c9be
glorious/gk: nitters - adds in ws mock server
Jul 22, 2024
03de669
linter: fix
Jul 22, 2024
eddb58b
Merge branch 'master' into gateio_ws
Jul 23, 2024
8159b05
fix deadlock on connection as the previous channel had no reader and …
Jul 24, 2024
4f0b42f
Merge branch 'master' into gateio_ws
Jul 24, 2024
2af934e
Merge branch 'master' into stream_match
Jul 24, 2024
0e3bb31
glorious: whooops
Jul 24, 2024
f98c3aa
gk: nits
Jul 24, 2024
d89a46a
Leak issue and edge case
Jul 25, 2024
8281b88
Websocket: Add SendMessageReturnResponses
gbjk Apr 8, 2024
a38a1d1
whooooooopsie
Jul 25, 2024
77ef366
gk: nitssssss
Jul 26, 2024
6341ccf
Update exchanges/stream/stream_match.go
shazbert Jul 26, 2024
c0d1d43
Update exchanges/stream/stream_match_test.go
shazbert Jul 26, 2024
9e57e65
linter: appease the linter gods
Jul 26, 2024
51b9f17
gk: nits
Jul 26, 2024
6376a12
gk: drain brain
Jul 26, 2024
f7adad2
started
Jul 28, 2024
9905686
more changes before merge match pr
Jul 31, 2024
d275e39
Merge branch 'master' into stream_match
Jul 31, 2024
8a64da1
Merge branch 'stream_match' into ws_outbound_req
Jul 31, 2024
9bb6ef4
gateio: still building out
Jul 31, 2024
3f3da46
gateio: finish spot
Jul 31, 2024
6b9c4ad
fix up tests in gateio
Jul 31, 2024
f7af44c
Add tests for stream package
Jul 31, 2024
3ed912b
rm unused field
Jul 31, 2024
ee8a35c
glorious: nits
Aug 1, 2024
ec33bd3
Merge branch 'stream_match' into ws_outbound_req
Aug 1, 2024
cc97528
rn files, specifically set function names to asset and offload routin…
Aug 3, 2024
66a8778
linter: fix
Aug 6, 2024
431c047
glorious: nits
Aug 15, 2024
7110e88
add counter and update gateio
Aug 16, 2024
67bb87d
Merge branch 'common_counter' into ws_outbound_req
Aug 16, 2024
b70296c
fix collision issue
Aug 16, 2024
d5bbd10
Merge branch 'master' into gateio_ws
Aug 19, 2024
d2f7c2e
Merge branch 'master' into gateio_ws
Aug 23, 2024
16d88cf
Merge branch 'master' into gateio_ws
Aug 24, 2024
9026bc8
Merge branch 'gateio_ws' into ws_outbound_req
Aug 24, 2024
0402bc7
Update exchanges/stream/websocket.go
shazbert Aug 30, 2024
0dfda95
glorious: nits
Aug 30, 2024
c58834e
add tests
Aug 30, 2024
d29893b
linter: fix
Aug 30, 2024
79e0eeb
Merge branch 'master' into gateio_ws
Aug 30, 2024
4f7bcd9
Merge branch 'master' into gateio_ws
Sep 2, 2024
45ff199
After merge
Sep 2, 2024
06acaac
Add error connection info
Sep 2, 2024
aa87e83
Merge branch 'gateio_ws' into ws_outbound_req
Sep 4, 2024
cf2e8d8
upgrade to upstream merge
Sep 5, 2024
af986da
Fix edge case where it does not reconnect made by an already closed c…
Sep 9, 2024
1171278
stream coverage
Sep 12, 2024
4be6214
glorious: nits
Sep 12, 2024
a068ddb
Merge branch 'master' into gateio_ws
Sep 12, 2024
81cba36
glorious: nits removed asset error handling in stream package
Sep 12, 2024
bdc6954
linter: fix
Sep 13, 2024
3fe44ca
rm block
Sep 13, 2024
818584f
Add basic readme
Sep 13, 2024
289ac71
Merge branch 'master' into gateio_ws
Sep 13, 2024
dee32a4
Merge branch 'master' into gateio_ws
Sep 13, 2024
7063311
Merge branch 'master' into gateio_ws
Sep 16, 2024
0709ba3
fix asset enabled flush cycle for multi connection
Sep 16, 2024
b877b38
spella: fix
Sep 16, 2024
f7d1ec8
linter: fix
Sep 18, 2024
818432d
Merge branch 'master' into gateio_ws
Sep 18, 2024
bdc7afb
Add glorious suggestions, fix some race thing
Sep 19, 2024
3d6541e
reinstate name before any routine gets spawned
Sep 19, 2024
33c4128
stop on error in mock tests
Sep 19, 2024
ea25763
glorious: nits
Sep 19, 2024
f15374a
Merge branch 'gateio_ws' into ws_outbound_req
Sep 22, 2024
ae92cd2
glorious: nits found in CI build
Sep 24, 2024
c49a75c
Add test for drain, bumped wait times as there seems to be something …
Sep 24, 2024
5551d54
mutex across shutdown and connect for protection
Sep 24, 2024
99c3c7b
lint: fix
Sep 24, 2024
f56cb78
test time withoffset, reinstate stop
Sep 24, 2024
b4bc7e2
fix whoops
Sep 24, 2024
ce4a5ce
const trafficCheckInterval; rm testmain
Sep 24, 2024
a745992
y
Sep 24, 2024
086fcc3
fix lint
Sep 24, 2024
a64e842
bump time check window
Sep 24, 2024
9e53313
stream: fix intermittant test failures while testing routines and rem…
Sep 25, 2024
10230b0
spells
Sep 25, 2024
4e02c4a
cant do what I did
Sep 25, 2024
7be80a0
protect race due to routine.
Sep 25, 2024
b51cf2f
update testURL
Sep 25, 2024
ff7ae03
use mock websocket connection instead of test URL's
Sep 25, 2024
1040153
linter: fix
Sep 25, 2024
f529bd2
remove url because its throwing errors on CI builds
Sep 25, 2024
5d0a7f7
connections drop all the time, don't need to worry about not being ab…
Sep 25, 2024
56cb431
remove another superfluous url thats not really set up for this
Sep 25, 2024
ca4999e
spawn overwatch routine when there is no errors, inline checker inste…
Sep 25, 2024
4240a0a
linter: fixerino uperino
Sep 26, 2024
8d6febc
glorious: panix
Sep 30, 2024
3df82ef
Merge branch 'master' into gateio_ws
Oct 1, 2024
7ff07d1
Merge branch 'master' into gateio_ws
Oct 1, 2024
3a24640
linter: things
Oct 1, 2024
1eef208
whoops
Oct 1, 2024
261b577
Merge branch 'master' into gateio_ws
Oct 1, 2024
dbd8acd
Merge branch 'gateio_ws' into ws_outbound_req
Oct 2, 2024
b528407
dont need to make consecutive Unix() calls
Oct 2, 2024
ee1cb94
websocket: fix potential panic on error and no responses and adding w…
Oct 3, 2024
9cdac76
Merge branch 'master' into ws_outbound_req
Oct 10, 2024
e5accaf
rm json parser and handle in json package instead
Oct 10, 2024
f124390
Merge branch 'master' into ws_outbound_req
Oct 23, 2024
d950b24
linter: fix
Oct 23, 2024
31339ed
linter: fix again
Oct 23, 2024
622c748
* change field name OutboundRequestSignature to WrapperDefinedConnect…
Oct 23, 2024
b71d3c0
spells and magic and wands
Oct 23, 2024
2bd207f
glorious: nits
Oct 25, 2024
511c78b
comparable check for signature
Oct 25, 2024
0a196b8
mv err var
Oct 25, 2024
f5ffe9f
Merge branch 'master' into ws_outbound_req
Nov 5, 2024
d3343a7
glorious: nits and stuff
Nov 5, 2024
56f483f
Merge branch 'master' into ws_outbound_req
Nov 7, 2024
2872e05
attempt to fix race
Nov 7, 2024
50e7253
Merge branch 'master' into ws_outbound_req
Nov 11, 2024
2b79a9c
glorious: nits
Nov 15, 2024
1696d08
gk: nits; engine log cleanup
Nov 20, 2024
cb2a235
gk: nits; OCD
Nov 20, 2024
78e974a
gk: nits; move function change file names
Nov 20, 2024
00a267d
gk: nits; :rocket:
Nov 20, 2024
72f97dd
gk: nits; convert variadic function and message inspection to interfa…
Nov 20, 2024
274ae8f
gk: nits; continued
Nov 20, 2024
25f00ce
gk: engine nits; rm loaded exchange
Nov 22, 2024
058b184
gk: nits; drop WebsocketLoginResponse
Nov 22, 2024
a87c438
stream: Add match method EnsureMatchWithData
Nov 22, 2024
6a2fbde
gk: nits; rn Inspect to IsFinal
Nov 22, 2024
cb96521
gk: nits; rn to MessageFilter
Nov 22, 2024
3417a55
linter: fix
Nov 23, 2024
03d9045
Merge branch 'master' into ws_outbound_req
Nov 26, 2024
70781cb
gateio: update rate limit definitions (cherry-pick)
Nov 27, 2024
6803a2a
Add test and missing
Nov 27, 2024
f8729d2
Merge branch 'master' into gateio_rate_limits
Dec 5, 2024
4baa7a2
Shared REST rate limit definitions with Websocket service, set lookup…
Dec 5, 2024
c0f0cd4
Merge branch 'master' into gateio_rate_limits
Dec 9, 2024
ede517b
Merge branch 'gateio_rate_limits' into ws_outbound_req
Dec 9, 2024
9c56cbb
integrate rate limits for websocket trading spot
Dec 9, 2024
b015319
Merge branch 'master' into ws_outbound_req
Dec 12, 2024
999a108
bitstamp: fix issue
Dec 12, 2024
c0acea2
glorious: nits
Dec 12, 2024
254ad2b
ch name and commentary
Dec 12, 2024
e803f77
fix bug add test
Dec 12, 2024
a8d30db
rm a thing
Dec 12, 2024
975a54c
fix test
Dec 12, 2024
1bdcd16
Update engine/engine.go
shazbert Dec 19, 2024
8f9e953
thrasher: nits
Dec 19, 2024
0d7b7db
Update exchanges/stream/stream_match_test.go
shazbert Dec 20, 2024
d164878
Update exchanges/stream/stream_match_test.go
shazbert Dec 20, 2024
544fbcc
GK: nits rn websocket functions
Dec 20, 2024
d07de5a
Merge branch 'master' into ws_outbound_req
Dec 20, 2024
df476e2
explicit function names for single to multi outbound orders
Dec 20, 2024
2182ddb
linter: fix
Dec 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix whoops
shazbert committed Sep 24, 2024
commit b4bc7e2ecb0c3fae554c45e065b0fca55e772c53
2 changes: 1 addition & 1 deletion exchanges/stream/websocket_test.go
Original file line number Diff line number Diff line change
@@ -194,7 +194,7 @@ func TestTrafficMonitorTrafficAlerts(t *testing.T) {
for i := range 6 { // Timeout will happen at 200ms so we want 6 * 50ms checks to pass
select {
case ws.TrafficAlert <- signal:
require.WithinDuration(t, thenish.Add(time.Duration(i)*trafficCheckInterval), time.Now(), trafficCheckInterval)
require.WithinDuration(t, time.Now(), thenish.Add(time.Duration(i)*trafficCheckInterval), trafficCheckInterval)
default:
require.Failf(t, "", "TrafficAlert should not block; Check #%d", i)
}