Manager paradigm change to an event-loop concurrency style, begun implementing batching in binance futures_websocket.go

This commit is contained in:
2025-09-07 12:01:36 +00:00
parent 98c030c562
commit 70f3714d2f
10 changed files with 1210 additions and 575 deletions

View File

@@ -28,15 +28,7 @@ func (s *GRPCStreamingServer) ConnectStream(req *pb.ConnectStreamRequest, stream
return fmt.Errorf("invalid UUID: %w", err)
}
// Defaults; tune or map from req if your proto carries options.
opts := manager.ChannelOpts{
InBufSize: 256,
OutBufSize: 1024,
DropOutbound: true, // do not let slow clients stall producers
DropInbound: true, // irrelevant here (we don't send inbound), safe default
}
_, out, err := s.manager.GetChannels(sessionID, opts)
_, out, err := s.manager.AttachClient(sessionID, 256, 1024)
if err != nil {
return fmt.Errorf("attach channels: %w", err)
}