go-flowrate
go-flowrate copied to clipboard
Go package for limiting and monitoring data flow rate
For example a HTTP transfer done in chunks, using flowrate inside a `http.RoundTripper`: ``` Go func (t *limitTransport) RoundTrip(r *http.Request) (res *http.Response, err error) { body := flowrate.NewReader(r.Body, -1) r.Body...
With Go 1.9.2 + go test -compiler gc -ldflags '-X github.com/mxk/go-flowrate/version.GitSHA=cca7078d478f8520f85629ad7c68962d31ed7682 -extldflags '\''-Wl,-z,relro '\''' --- FAIL: TestWriter (0.38s) io_test.go:126: w.Write(b[20:]) returned ahead of time (382.895154ms) FAIL exit status 1 FAIL...
Tendermint has to use this to pre-seed REMA, to meet a threshold before time passes.