diff --git a/agent/connect/ca/provider_test.go b/agent/connect/ca/provider_test.go index 1bc1c89715..c8cd657782 100644 --- a/agent/connect/ca/provider_test.go +++ b/agent/connect/ca/provider_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" "github.com/stretchr/testify/require" "github.com/hashicorp/consul/agent/structs" diff --git a/agent/consul/acl_endpoint_test.go b/agent/consul/acl_endpoint_test.go index c96fec4e48..009f1c52de 100644 --- a/agent/consul/acl_endpoint_test.go +++ b/agent/consul/acl_endpoint_test.go @@ -3,15 +3,15 @@ package consul import ( "fmt" "io/ioutil" - "net/rpc" "os" "path/filepath" "strings" "testing" "time" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" + "github.com/hashicorp/consul-net-rpc/net/rpc" uuid "github.com/hashicorp/go-uuid" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/stretchr/testify/require" "gopkg.in/square/go-jose.v2/jwt" diff --git a/agent/consul/acl_test.go b/agent/consul/acl_test.go index d453d50a01..54dc3a6b56 100644 --- a/agent/consul/acl_test.go +++ b/agent/consul/acl_test.go @@ -9,9 +9,9 @@ import ( "testing" "time" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-uuid" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/agent/consul/authmethod/kubeauth/k8s_test.go b/agent/consul/authmethod/kubeauth/k8s_test.go index 060959b362..e8c1abe1ba 100644 --- a/agent/consul/authmethod/kubeauth/k8s_test.go +++ b/agent/consul/authmethod/kubeauth/k8s_test.go @@ -5,10 +5,10 @@ import ( "context" "testing" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" "github.com/hashicorp/consul/agent/connect" "github.com/hashicorp/consul/agent/consul/authmethod" "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/go-msgpack/codec" "github.com/stretchr/testify/require" ) diff --git a/agent/consul/auto_config_endpoint_test.go b/agent/consul/auto_config_endpoint_test.go index f082a70ede..2a772768a2 100644 --- a/agent/consul/auto_config_endpoint_test.go +++ b/agent/consul/auto_config_endpoint_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/hashicorp/memberlist" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/agent/consul/auto_encrypt_endpoint_test.go b/agent/consul/auto_encrypt_endpoint_test.go index 800392b95e..1605d2c4c3 100644 --- a/agent/consul/auto_encrypt_endpoint_test.go +++ b/agent/consul/auto_encrypt_endpoint_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/agent/consul/catalog_endpoint_test.go b/agent/consul/catalog_endpoint_test.go index f789c77ebf..04667bc0f9 100644 --- a/agent/consul/catalog_endpoint_test.go +++ b/agent/consul/catalog_endpoint_test.go @@ -2,7 +2,6 @@ package consul import ( "fmt" - "net/rpc" "os" "strings" "testing" @@ -10,7 +9,8 @@ import ( "github.com/hashicorp/go-uuid" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" + "github.com/hashicorp/consul-net-rpc/net/rpc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/agent/consul/client_test.go b/agent/consul/client_test.go index 9eb45aa8d5..048df454c8 100644 --- a/agent/consul/client_test.go +++ b/agent/consul/client_test.go @@ -10,8 +10,8 @@ import ( "testing" "time" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/hashicorp/go-hclog" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/serf/serf" "github.com/stretchr/testify/require" "golang.org/x/time/rate" diff --git a/agent/consul/cluster_test.go b/agent/consul/cluster_test.go index 29799a39ce..bf2c63a2e8 100644 --- a/agent/consul/cluster_test.go +++ b/agent/consul/cluster_test.go @@ -1,10 +1,10 @@ package consul import ( - "net/rpc" "os" "testing" + "github.com/hashicorp/consul-net-rpc/net/rpc" "github.com/hashicorp/consul/testrpc" "github.com/stretchr/testify/require" ) diff --git a/agent/consul/config_endpoint_test.go b/agent/consul/config_endpoint_test.go index aa10220a33..2dbe5dba35 100644 --- a/agent/consul/config_endpoint_test.go +++ b/agent/consul/config_endpoint_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/stretchr/testify/require" "github.com/hashicorp/consul/acl" diff --git a/agent/consul/connect_ca_endpoint_test.go b/agent/consul/connect_ca_endpoint_test.go index f32bf6ec1d..3947214114 100644 --- a/agent/consul/connect_ca_endpoint_test.go +++ b/agent/consul/connect_ca_endpoint_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/agent/consul/coordinate_endpoint_test.go b/agent/consul/coordinate_endpoint_test.go index c75e05d732..25cb41a5f7 100644 --- a/agent/consul/coordinate_endpoint_test.go +++ b/agent/consul/coordinate_endpoint_test.go @@ -4,13 +4,13 @@ import ( "fmt" "math" "math/rand" - "net/rpc" "os" "strings" "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" + "github.com/hashicorp/consul-net-rpc/net/rpc" "github.com/hashicorp/serf/coordinate" "github.com/stretchr/testify/require" diff --git a/agent/consul/discovery_chain_endpoint_test.go b/agent/consul/discovery_chain_endpoint_test.go index d1ecb2cbe0..66c0aeb653 100644 --- a/agent/consul/discovery_chain_endpoint_test.go +++ b/agent/consul/discovery_chain_endpoint_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/stretchr/testify/require" "github.com/hashicorp/consul/acl" diff --git a/agent/consul/federation_state_endpoint_test.go b/agent/consul/federation_state_endpoint_test.go index f3a1e345f9..8cd8808269 100644 --- a/agent/consul/federation_state_endpoint_test.go +++ b/agent/consul/federation_state_endpoint_test.go @@ -1,13 +1,13 @@ package consul import ( - "net/rpc" "os" "testing" "time" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" + "github.com/hashicorp/consul-net-rpc/net/rpc" uuid "github.com/hashicorp/go-uuid" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/stretchr/testify/require" "github.com/hashicorp/consul/acl" diff --git a/agent/consul/fsm/fsm.go b/agent/consul/fsm/fsm.go index e0c8f26b28..9dcc5f64f3 100644 --- a/agent/consul/fsm/fsm.go +++ b/agent/consul/fsm/fsm.go @@ -6,8 +6,8 @@ import ( "sync" "time" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/go-raftchunking" "github.com/hashicorp/raft" diff --git a/agent/consul/fsm/snapshot.go b/agent/consul/fsm/snapshot.go index 696ca56453..42175561d2 100644 --- a/agent/consul/fsm/snapshot.go +++ b/agent/consul/fsm/snapshot.go @@ -6,9 +6,9 @@ import ( "github.com/armon/go-metrics" "github.com/armon/go-metrics/prometheus" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" "github.com/hashicorp/consul/agent/consul/state" "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/go-raftchunking" "github.com/hashicorp/raft" ) diff --git a/agent/consul/fsm/snapshot_oss.go b/agent/consul/fsm/snapshot_oss.go index 7ebec8a331..48dea223e1 100644 --- a/agent/consul/fsm/snapshot_oss.go +++ b/agent/consul/fsm/snapshot_oss.go @@ -1,7 +1,7 @@ package fsm import ( - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" "github.com/hashicorp/raft" "github.com/hashicorp/consul/agent/consul/state" diff --git a/agent/consul/fsm/snapshot_oss_test.go b/agent/consul/fsm/snapshot_oss_test.go index 6527068650..6d14d6f2db 100644 --- a/agent/consul/fsm/snapshot_oss_test.go +++ b/agent/consul/fsm/snapshot_oss_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" "github.com/hashicorp/go-raftchunking" "github.com/stretchr/testify/require" diff --git a/agent/consul/health_endpoint_test.go b/agent/consul/health_endpoint_test.go index ccee0932b1..d84fbb21a4 100644 --- a/agent/consul/health_endpoint_test.go +++ b/agent/consul/health_endpoint_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/agent/consul/helper_test.go b/agent/consul/helper_test.go index c971335804..f5c37f14d4 100644 --- a/agent/consul/helper_test.go +++ b/agent/consul/helper_test.go @@ -4,10 +4,10 @@ import ( "errors" "fmt" "net" - "net/rpc" "testing" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" + "github.com/hashicorp/consul-net-rpc/net/rpc" "github.com/hashicorp/raft" "github.com/hashicorp/serf/serf" "github.com/stretchr/testify/require" diff --git a/agent/consul/intention_endpoint_test.go b/agent/consul/intention_endpoint_test.go index 0574984abd..455fd45e05 100644 --- a/agent/consul/intention_endpoint_test.go +++ b/agent/consul/intention_endpoint_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/stretchr/testify/require" "github.com/hashicorp/consul/acl" diff --git a/agent/consul/internal_endpoint_test.go b/agent/consul/internal_endpoint_test.go index b779099119..946e099a58 100644 --- a/agent/consul/internal_endpoint_test.go +++ b/agent/consul/internal_endpoint_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/agent/consul/kvs_endpoint_test.go b/agent/consul/kvs_endpoint_test.go index 4723cfdb8a..10c94e7025 100644 --- a/agent/consul/kvs_endpoint_test.go +++ b/agent/consul/kvs_endpoint_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/stretchr/testify/require" "github.com/hashicorp/consul/acl" diff --git a/agent/consul/leader_connect_ca_test.go b/agent/consul/leader_connect_ca_test.go index c3115668e7..ead1a763a7 100644 --- a/agent/consul/leader_connect_ca_test.go +++ b/agent/consul/leader_connect_ca_test.go @@ -11,12 +11,12 @@ import ( "errors" "fmt" "math/big" - "net/rpc" "net/url" "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" + "github.com/hashicorp/consul-net-rpc/net/rpc" vaultapi "github.com/hashicorp/vault/api" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/agent/consul/leader_connect_test.go b/agent/consul/leader_connect_test.go index b4ad06c52b..50ad18c604 100644 --- a/agent/consul/leader_connect_test.go +++ b/agent/consul/leader_connect_test.go @@ -12,8 +12,8 @@ import ( "testing" "time" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" uuid "github.com/hashicorp/go-uuid" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/stretchr/testify/require" "github.com/hashicorp/consul/agent/connect" diff --git a/agent/consul/leader_test.go b/agent/consul/leader_test.go index 5106651b32..46a047940b 100644 --- a/agent/consul/leader_test.go +++ b/agent/consul/leader_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/hashicorp/go-hclog" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/serf/serf" "github.com/stretchr/testify/require" diff --git a/agent/consul/operator_autopilot_endpoint_test.go b/agent/consul/operator_autopilot_endpoint_test.go index 501f0f15d6..e28f30dabf 100644 --- a/agent/consul/operator_autopilot_endpoint_test.go +++ b/agent/consul/operator_autopilot_endpoint_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/hashicorp/raft" autopilot "github.com/hashicorp/raft-autopilot" "github.com/stretchr/testify/require" diff --git a/agent/consul/operator_raft_endpoint_test.go b/agent/consul/operator_raft_endpoint_test.go index 1b944b3fcd..e9e055e680 100644 --- a/agent/consul/operator_raft_endpoint_test.go +++ b/agent/consul/operator_raft_endpoint_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/hashicorp/raft" "github.com/stretchr/testify/require" diff --git a/agent/consul/prepared_query_endpoint_test.go b/agent/consul/prepared_query_endpoint_test.go index c77a0d40c4..8c67eb5d71 100644 --- a/agent/consul/prepared_query_endpoint_test.go +++ b/agent/consul/prepared_query_endpoint_test.go @@ -3,7 +3,6 @@ package consul import ( "bytes" "fmt" - "net/rpc" "os" "reflect" "sort" @@ -11,8 +10,9 @@ import ( "testing" "time" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" + "github.com/hashicorp/consul-net-rpc/net/rpc" "github.com/hashicorp/go-hclog" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/serf/coordinate" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/agent/consul/rpc.go b/agent/consul/rpc.go index 6a50781708..60c192acc9 100644 --- a/agent/consul/rpc.go +++ b/agent/consul/rpc.go @@ -14,12 +14,12 @@ import ( "github.com/armon/go-metrics" "github.com/armon/go-metrics/prometheus" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" connlimit "github.com/hashicorp/go-connlimit" "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" "github.com/hashicorp/go-raftchunking" "github.com/hashicorp/memberlist" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/raft" "github.com/hashicorp/yamux" "google.golang.org/grpc" diff --git a/agent/consul/rpc_test.go b/agent/consul/rpc_test.go index 0782cbadee..cc3673fff6 100644 --- a/agent/consul/rpc_test.go +++ b/agent/consul/rpc_test.go @@ -19,10 +19,10 @@ import ( "testing" "time" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" - "github.com/hashicorp/go-msgpack/codec" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/raft" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/agent/consul/rtt_test.go b/agent/consul/rtt_test.go index 4afbd2dbbd..d9a0fe1133 100644 --- a/agent/consul/rtt_test.go +++ b/agent/consul/rtt_test.go @@ -2,7 +2,6 @@ package consul import ( "fmt" - "net/rpc" "os" "strings" "testing" @@ -11,7 +10,9 @@ import ( "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/lib" "github.com/hashicorp/consul/testrpc" - "github.com/hashicorp/net-rpc-msgpackrpc" + + "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" + "github.com/hashicorp/consul-net-rpc/net/rpc" ) // verifyNodeSort makes sure the order of the nodes in the slice is the same as diff --git a/agent/consul/server.go b/agent/consul/server.go index 4d26ea6e8d..dd3df88101 100644 --- a/agent/consul/server.go +++ b/agent/consul/server.go @@ -7,7 +7,6 @@ import ( "io" "io/ioutil" "net" - "net/rpc" "os" "path/filepath" "reflect" @@ -21,6 +20,7 @@ import ( "go.etcd.io/bbolt" "github.com/armon/go-metrics" + "github.com/hashicorp/consul-net-rpc/net/rpc" connlimit "github.com/hashicorp/go-connlimit" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" diff --git a/agent/consul/server_test.go b/agent/consul/server_test.go index c06b95487e..ea4ea177f6 100644 --- a/agent/consul/server_test.go +++ b/agent/consul/server_test.go @@ -4,7 +4,6 @@ import ( "crypto/x509" "fmt" "net" - "net/rpc" "os" "strings" "sync/atomic" @@ -17,6 +16,7 @@ import ( "github.com/hashicorp/consul/ipaddr" + "github.com/hashicorp/consul-net-rpc/net/rpc" "github.com/hashicorp/go-uuid" "golang.org/x/time/rate" diff --git a/agent/consul/session_endpoint_test.go b/agent/consul/session_endpoint_test.go index 466e314b2d..cbfcdc43f7 100644 --- a/agent/consul/session_endpoint_test.go +++ b/agent/consul/session_endpoint_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/stretchr/testify/require" "github.com/hashicorp/consul/acl" diff --git a/agent/consul/session_ttl_test.go b/agent/consul/session_ttl_test.go index 5fc4b09f32..c380962e41 100644 --- a/agent/consul/session_ttl_test.go +++ b/agent/consul/session_ttl_test.go @@ -7,11 +7,11 @@ import ( "testing" "time" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/sdk/testutil/retry" "github.com/hashicorp/consul/testrpc" "github.com/hashicorp/go-uuid" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" ) func generateUUID() (ret string) { diff --git a/agent/consul/snapshot_endpoint.go b/agent/consul/snapshot_endpoint.go index 66b3949892..ded145851d 100644 --- a/agent/consul/snapshot_endpoint.go +++ b/agent/consul/snapshot_endpoint.go @@ -16,7 +16,7 @@ import ( "net" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" "github.com/hashicorp/consul/acl" "github.com/hashicorp/consul/agent/pool" diff --git a/agent/consul/snapshot_endpoint_test.go b/agent/consul/snapshot_endpoint_test.go index be02983327..03e25f8471 100644 --- a/agent/consul/snapshot_endpoint_test.go +++ b/agent/consul/snapshot_endpoint_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" autopilot "github.com/hashicorp/raft-autopilot" "github.com/stretchr/testify/require" diff --git a/agent/consul/status_endpoint_test.go b/agent/consul/status_endpoint_test.go index ee27b2d783..668fe85d17 100644 --- a/agent/consul/status_endpoint_test.go +++ b/agent/consul/status_endpoint_test.go @@ -2,12 +2,12 @@ package consul import ( "net" - "net/rpc" "os" "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" + "github.com/hashicorp/consul-net-rpc/net/rpc" "github.com/stretchr/testify/require" "github.com/hashicorp/consul/agent/pool" diff --git a/agent/consul/txn_endpoint_test.go b/agent/consul/txn_endpoint_test.go index 576343edfd..0d7393dab2 100644 --- a/agent/consul/txn_endpoint_test.go +++ b/agent/consul/txn_endpoint_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" "github.com/stretchr/testify/require" "github.com/hashicorp/consul/acl" diff --git a/agent/pool/pool.go b/agent/pool/pool.go index 64d779b601..4df55966dc 100644 --- a/agent/pool/pool.go +++ b/agent/pool/pool.go @@ -7,12 +7,12 @@ import ( "fmt" "log" "net" - "net/rpc" "sync" "sync/atomic" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc" + "github.com/hashicorp/consul-net-rpc/net/rpc" "github.com/hashicorp/yamux" "github.com/hashicorp/consul/agent/structs" diff --git a/agent/structs/config_entry.go b/agent/structs/config_entry.go index 3ea7c18f38..4f7ec4cd77 100644 --- a/agent/structs/config_entry.go +++ b/agent/structs/config_entry.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" "github.com/hashicorp/go-multierror" "github.com/mitchellh/hashstructure" "github.com/mitchellh/mapstructure" diff --git a/agent/structs/config_entry_test.go b/agent/structs/config_entry_test.go index 54c7989fc2..f99f1dcc2e 100644 --- a/agent/structs/config_entry_test.go +++ b/agent/structs/config_entry_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/google/go-cmp/cmp" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" "github.com/hashicorp/hcl" "github.com/mitchellh/copystructure" "github.com/stretchr/testify/assert" diff --git a/agent/structs/structs.go b/agent/structs/structs.go index e2e94b4387..5c509f683d 100644 --- a/agent/structs/structs.go +++ b/agent/structs/structs.go @@ -14,7 +14,7 @@ import ( "strings" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" "github.com/hashicorp/go-multierror" "github.com/hashicorp/serf/coordinate" "github.com/mitchellh/hashstructure" diff --git a/agent/structs/testing.go b/agent/structs/testing.go index 5d52d87a0a..5d42cf7e3d 100644 --- a/agent/structs/testing.go +++ b/agent/structs/testing.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" "github.com/stretchr/testify/require" ) diff --git a/agent/user_event.go b/agent/user_event.go index 3df2b6bd82..bcbd9c5a41 100644 --- a/agent/user_event.go +++ b/agent/user_event.go @@ -5,7 +5,7 @@ import ( "fmt" "regexp" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" "github.com/hashicorp/go-uuid" "github.com/hashicorp/consul/agent/structs" diff --git a/command/snapshot/inspect/snapshot_inspect.go b/command/snapshot/inspect/snapshot_inspect.go index 5d9baacaab..d0deec4435 100644 --- a/command/snapshot/inspect/snapshot_inspect.go +++ b/command/snapshot/inspect/snapshot_inspect.go @@ -11,12 +11,12 @@ import ( "sort" "strings" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" "github.com/hashicorp/consul/agent/consul/fsm" "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/command/flags" "github.com/hashicorp/consul/snapshot" "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/raft" "github.com/mitchellh/cli" ) diff --git a/go.mod b/go.mod index 913993383c..091dd9937c 100644 --- a/go.mod +++ b/go.mod @@ -30,6 +30,7 @@ require ( github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22 github.com/google/tcpproxy v0.0.0-20180808230851-dfa16c61dad2 github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 + github.com/hashicorp/consul-net-rpc v0.0.0-20220207223504-4cffceffcd29 github.com/hashicorp/consul/api v1.11.0 github.com/hashicorp/consul/sdk v0.8.0 github.com/hashicorp/go-bexpr v0.1.2 @@ -39,7 +40,6 @@ require ( github.com/hashicorp/go-discover v0.0.0-20210818145131-c573d69da192 github.com/hashicorp/go-hclog v0.14.1 github.com/hashicorp/go-memdb v1.3.2 - github.com/hashicorp/go-msgpack v0.5.5 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-raftchunking v0.6.2 github.com/hashicorp/go-retryablehttp v0.6.7 // indirect @@ -51,7 +51,6 @@ require ( github.com/hashicorp/hcl v1.0.0 github.com/hashicorp/hil v0.0.0-20200423225030-a18a1cd20038 github.com/hashicorp/memberlist v0.3.1 - github.com/hashicorp/net-rpc-msgpackrpc v0.0.0-20151116020338-a14192a58a69 github.com/hashicorp/raft v1.3.3 github.com/hashicorp/raft-autopilot v0.1.5 github.com/hashicorp/raft-boltdb v0.0.0-20211202195631-7d34b9fb3f42 // indirect diff --git a/go.sum b/go.sum index c2df87dd3e..777b0d1098 100644 --- a/go.sum +++ b/go.sum @@ -220,6 +220,8 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmo github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul-net-rpc v0.0.0-20220207223504-4cffceffcd29 h1:0BbXmAgzy5vx2rjixiO1FLJBdYJfEvSixcjWOli2w+Q= +github.com/hashicorp/consul-net-rpc v0.0.0-20220207223504-4cffceffcd29/go.mod h1:vWEAHAeAqfOwB3pSgHMQpIu8VH1jL+Ltg54Tw0wt/NI= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-bexpr v0.1.2 h1:ijMXI4qERbzxbCnkxmfUtwMyjrrk3y+Vt0MxojNCbBs= @@ -288,8 +290,6 @@ github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/ github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.3.1 h1:MXgUXLqva1QvpVEDQW1IQLG0wivQAtmFlHRQ+1vWZfM= github.com/hashicorp/memberlist v0.3.1/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/net-rpc-msgpackrpc v0.0.0-20151116020338-a14192a58a69 h1:lc3c72qGlIMDqQpQH82Y4vaglRMMFdJbziYWriR4UcE= -github.com/hashicorp/net-rpc-msgpackrpc v0.0.0-20151116020338-a14192a58a69/go.mod h1:/z+jUGRBlwVpUZfjute9jWaF6/HuhjuFQuL1YXzVD1Q= github.com/hashicorp/raft v1.1.0/go.mod h1:4Ak7FSPnuvmb0GV6vgIAJ4vYT4bek9bb6Q+7HVbyzqM= github.com/hashicorp/raft v1.1.1/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= github.com/hashicorp/raft v1.2.0/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= diff --git a/lib/eof.go b/lib/eof.go index aadabe731e..d4bd1b75a2 100644 --- a/lib/eof.go +++ b/lib/eof.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" "io" - "net/rpc" "strings" + "github.com/hashicorp/consul-net-rpc/net/rpc" "github.com/hashicorp/yamux" ) diff --git a/lib/eof_test.go b/lib/eof_test.go index 38106ae997..de63e15e17 100644 --- a/lib/eof_test.go +++ b/lib/eof_test.go @@ -3,10 +3,11 @@ package lib import ( "fmt" "io" - "net/rpc" "testing" + "github.com/hashicorp/consul-net-rpc/net/rpc" "github.com/hashicorp/yamux" + "github.com/stretchr/testify/require" ) diff --git a/snapshot/snapshot_test.go b/snapshot/snapshot_test.go index 44f505d215..4fb570bb7b 100644 --- a/snapshot/snapshot_test.go +++ b/snapshot/snapshot_test.go @@ -11,9 +11,9 @@ import ( "testing" "time" + "github.com/hashicorp/consul-net-rpc/go-msgpack/codec" "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/sdk/testutil" - "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/raft" "github.com/stretchr/testify/require" )