zrepl/rpc/dataconn
Christian Schwarz b9250a41a2 go1.18: address net.Error.Temporary() deprecation
Go 1.18 deprecated net.Error.Temporary().
This commit cleans up places where we use it incorrectly.
Also, the rpc layer defines some errors that implement

  interface { Temporary() bool }

I added comments to all of the implementations to indicate
whether they will be required if net.Error.Temporary is ever
ever removed in the future.

For HandshakeError, the Temporary() return value is actually
important. I moved & rewrote a (previously misplaced) comment
there.

The ReadStreamError changes were
1. necessary to pacify newer staticcheck and
2. technically, an error can implement Temporary()
   without being net.Err. This applies to some syscall
   errors in the standard library.

Reading list for those interested:
- https://github.com/golang/go/issues/45729
- https://groups.google.com/g/golang-nuts/c/-JcZzOkyqYI
- https://man7.org/linux/man-pages/man2/accept.2.html

Note: This change was prompted by staticheck:

> SA1019: neterr.Temporary has been deprecated since Go 1.18 because it
> shouldn't be used: Temporary errors are not well-defined. Most
> "temporary" errors are timeouts, and the few exceptions are surprising.
> Do not use this method. (staticcheck)
2022-10-24 22:21:52 +02:00
..
base2bufpool build: drop go Dep, switch to modules, support Go 1.13 2019-09-14 13:36:44 +02:00
frameconn bump golangci-lint to 1.35.2 and fix resulting lint errors 2021-01-25 00:16:01 +01:00
heartbeatconn go1.18: address net.Error.Temporary() deprecation 2022-10-24 22:21:52 +02:00
microbenchmark [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
stream go1.18: address net.Error.Temporary() deprecation 2022-10-24 22:21:52 +02:00
timeoutconn Add --skip-cert-check flag to zrepl configcheck to prevent checking cert files 2022-07-08 20:18:41 +02:00
dataconn_client.go rework size estimation & dry sends 2021-10-09 15:43:27 +02:00
dataconn_debug.go bump golangci-lint to 1.35.2 and fix resulting lint errors 2021-01-25 00:16:01 +01:00
dataconn_server.go rpc/dataconn: always close send stream returned from Sender.Send() 2021-10-09 15:43:31 +02:00
dataconn_shared.go [#277] rpc + zfs: drop zfs.StreamCopier, use io.ReadCloser instead 2020-05-18 19:46:24 +02:00
dataconn_test.go rpc rewrite: control RPCs using gRPC + separate RPC for data transfer 2019-03-13 13:53:48 +01:00