Skip to content

Commit

Permalink
Remove HTTP/3 for go1.18 and below
Browse files Browse the repository at this point in the history
  • Loading branch information
vearutop committed Jun 30, 2023
1 parent 18db63f commit 5e9a724
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,12 @@ go install github.com/vearutop/plt@latest
$(go env GOPATH)/bin/plt --help
```

Or (with `go1.15` or older)

```
go get -u github.com/vearutop/plt
$(go env GOPATH)/bin/plt --help
```

Or download binary from [releases](https://github.com/vearutop/plt/releases).

### Linux AMD64

```
wget https://github.com/vearutop/plt/releases/latest/download/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && rm linux_amd64.tar.gz
wget -q https://github.com/vearutop/plt/releases/latest/download/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && rm linux_amd64.tar.gz
./plt -version
```

Expand Down Expand Up @@ -68,7 +61,7 @@ For even better performance you can use `plt curl --fast` that will employ
awesome [fasthttp](https://github.com/valyala/fasthttp)
as transport. This mode lacks detailed breakdown of latencies, but can push request rate to the limit.

Use `--http2` or `--http3` for HTTP/2 or HTTP/3.
Use `--http2` for HTTP/2 or `--http3` for HTTP/3 (go1.19 or later).

If the server is wrapped with Envoy proxy, upstream latency distribution will be collected from the values
of [`X-Envoy-Upstream-Service-Time`](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-upstream-service-time)
Expand Down
2 changes: 2 additions & 0 deletions nethttp/http3.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build go1.19

package nethttp

import (
Expand Down
12 changes: 12 additions & 0 deletions nethttp/http3_go1.18.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//go:build !go1.19

Check notice on line 1 in nethttp/http3_go1.18.go

View workflow job for this annotation

GitHub Actions / test (1.20.x)

File is not covered by tests.

package nethttp

import "net/http"

// HTTP3Available guards HTTP3 library.
const HTTP3Available = false

func (j *JobProducer) makeTransport3() http.RoundTripper {
return nil
}

0 comments on commit 5e9a724

Please sign in to comment.