Releases: connectrpc/connect-go
v1.10.1
v1.10.0
NOTICE: This version has been retracted due to a corruption in the global module cache. Use v1.10.1 instead.
What's Changed
Enhancements
- Add WithConditionalHandlerOptions for method-specific options by @emcfarlane in #538
Bugfixes
- Distinguish expected from unexpected EOFs by @emcfarlane in #533 and #539
- Make clients always drain stream by @emcfarlane in #536
Other changes
- Update buf studio URL in README by @pkwarren in #544
- Improve WithConditionalHandlerOptions docs by @akshayjshah in #548
Full Changelog: v1.9.0...v1.10.0
v1.9.1
v1.9.0
NOTICE: This version has been retracted due to a corruption in the global module cache. Use v1.9.1 instead.
What's Changed
Along with a few new features and bugfixes, this release includes a variety of internal performance improvements.
[v1.8.0] BenchmarkConnect/unary-12 8415 1305116 ns/op 14449031 B/op 254 allocs/op
[v1.9.0] BenchmarkConnect/unary-12 10443 1151366 ns/op 6024079 B/op 236 allocs/op
Enhancements
- Allow clients to set Host in headers by @emcfarlane in #522
- Allow Connect clients to configure max HTTP GET size by @jhump in #529
- Reduce allocations in HTTP routing by @mattrobenolt in #519
- Cache mapping of methods to protocol handlers by @emcfarlane in #525
- Improve performance of percent encoding by @emcfarlane in #531
- Reduce marshaling allocations with MarshalAppend by @emcfarlane in #503
Bugfixes
- Discard unknown JSON fields by default by @akshayjshah in #518
- Canonicalize Connect streaming trailer names by @jchadwick-buf in #528
Other changes
- Tighten internal lint checks by @zchee in #520
- Simplify code when pooled buffers aren't returned by @pkwarren in #532
New Contributors
- @zchee made their first contribution in #520
- @emcfarlane made their first contribution in #522
Full Changelog: v1.8.0...v1.9.0
v1.8.0
What's Changed
Enhancements
- Expose HTTP method of unary requests (see documentation) by @jhump and @akshayjshah in #502 and #509
- Implement
fmt.Stringer
interface for StreamType to improve debug logging by @svrana in #495
Bugfixes
- Fix documentation comments to use correct identifier name by @cuishuang in #498
- Fix Makefile quotes to handle paths with spaces by @bufdev in #508
- Always close response body in
CloseRead
by @pkwarren in #515
New Contributors
- @cuishuang made their first contribution in #498
- @svrana made their first contribution in #495
Full Changelog: v1.7.0...v1.8.0
v1.7.0
What's Changed
As of this release, the Connect protocol supports performing idempotent, side-effect free requests using HTTP GETs. This makes it easier to cache responses in the browser, on your CDN, or in proxies and other middleboxes.
Note
This functionality is only supported when using the Connect protocol—using a Connect client with a Connect server. When usinggrpc-go
clients, orconnect-go
clients configured with theWithGRPC
orWithGRPCWeb
options, all requests will continue to be HTTP POSTs.
To opt into GET support for a given Protobuf RPC, you must mark it as being side-effect free using the MethodOptions.IdempotencyLevel option:
service ElizaService {
rpc Say(stream SayRequest) returns (SayResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
}
}
With this schema change, handlers will automatically support both GET and POST requests for this RPC. However, clients will continue to use POST requests by default, even when GETs are possible. To make clients use GETs for side effect free RPCs, use the WithHTTPGet
option:
client := elizav1connect.NewElizaServiceClient(
http.DefaultClient,
connect.WithHTTPGet(),
)
This functionality is not yet supported by other Connect implementations (including connect-es
), but hang tight! We're working on it. For more information, please check the full documentation.
Enhancements
- Connect HTTP Get support by @jchadwick-buf in #478
- Add APIs to make and handle conditional GETs by @akshayjshah in #494
Bugfixes
Full Changelog: v1.6.0...v1.7.0
v1.6.0
What's Changed
Enhancements
- Improve comments & add procedure consts to generated code by @akshayjshah in #480
- Reduce per-call URL parsing cost by @mattrobenolt in #467
- Improve errors for outdated protobuf runtimes by @akshayjshah in #465
- Switch README to use
buf curl
by @akshayjshah in #474
Bugfixes
- Clarify purpose of handler_stream_test.go by @Hirochon in #472
- Make StreamType constants typed numerics by @jhump in #486
- Populate Spec and Peer in Client.CallServerStream by @jhump in #487
New Contributors
Full Changelog: v1.5.2...v1.6.0
v1.5.2
What's Changed
Bugfixes
- More explicit error on empty JSON bodies by @akshayjshah in #459
- Fix string casing for gRPC-Web trailers by @timostamm in #461
Full Changelog: v1.5.1...v1.5.2
v1.5.1
What's Changed
Thanks to @mattrobenolt, v1.5.1 exclusively contains performance improvements. There should be no other user-visible behavior changes.
Bugfixes
- Minimize allocations writing User-Agent header by @mattrobenolt in #446
- Minimize allocations parsing Content-Type by @mattrobenolt in #444
- Optimize header access by @mattrobenolt in #445
- Optimize Peer lookups by @mattrobenolt in #447
Full Changelog: v1.5.0...v1.5.1
v1.5.0
What's Changed
Enhancements
- Add NewWireError for propagating partial stream failures by @akshayjshah in #437
Bugfixes
New Contributors
Full Changelog: v1.4.1...v1.5.0