Comments (1)
AFAICT most of the code added to the RequestTracker from #1390 (and mirrored in feature/p2p for p2p http conns) can be replaced with two lines by the Go 1.20 ResponseController feature https://tip.golang.org/doc/go1.20#http_responsecontroller like in their example — vastly easier than managing a conn tracking middleware system
The ResponseController type provides a clearer, more discoverable way to add per-handler controls. Two such controls also added in Go 1.20 are SetReadDeadline and SetWriteDeadline, which allow setting per-request read and write deadlines. For example:
func RequestHandler(w ResponseWriter, r *Request) { rc := http.NewResponseController(w) rc.SetWriteDeadline(time.Time{}) // disable Server.WriteTimeout when sending a large response io.Copy(w, bigData) }
from go-algorand.
Related Issues (20)
- Catchpoint is very slow HOT 3
- Add option to store and retrieve deltas HOT 2
- Node's ready status is incorrect while the node is starting HOT 2
- Buggy test?
- increase max lsig program size HOT 6
- Add access to incentive related consensus parameters HOT 3
- 3.24.0 - make - version of quic-go not supporting Go 1.21 HOT 1
- Algod docker image configuration support for ColdDataDir HOT 1
- request body too large HOT 5
- P2P configuration options
- p2p: limit connections made by dht and pubsub
- p2p: support Prometheus histogram and summary metric types
- Crash on catchup abort if start fails
- Txpool: Transaction Broadcasting Inefficiency HOT 7
- followLatest catchup algorithm does not work for small peer sets HOT 4
- Allow multiple log archive files
- Op code to receive the app call sender HOT 7
- Network Testing: Come up with new/hybrid topologies and modified scenarios HOT 1
- REST API `LedgerStateDelta.Txleases` contains invalid JSON HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-algorand.