From 2368933e0b0b3424dcb3ce5dedec10fc25410e81 Mon Sep 17 00:00:00 2001 From: JmPotato Date: Wed, 20 Nov 2024 14:53:11 +0800 Subject: [PATCH] Use a more clear package naming Signed-off-by: JmPotato --- client/client.go | 2 +- client/http/client.go | 2 +- client/{sd => servicediscovery}/mock_pd_service_discovery.go | 0 client/{sd => servicediscovery}/pd_service_discovery.go | 0 client/{sd => servicediscovery}/pd_service_discovery_test.go | 0 client/{sd => servicediscovery}/tso_service_discovery.go | 0 client/tso_client.go | 2 +- client/tso_dispatcher.go | 2 +- client/tso_dispatcher_test.go | 2 +- tests/integrations/client/client_test.go | 2 +- tests/integrations/mcs/resourcemanager/resource_manager_test.go | 2 +- tests/integrations/tso/client_test.go | 2 +- tools/pd-simulator/simulator/client.go | 2 +- tools/pd-simulator/simulator/drive.go | 2 +- 14 files changed, 10 insertions(+), 10 deletions(-) rename client/{sd => servicediscovery}/mock_pd_service_discovery.go (100%) rename client/{sd => servicediscovery}/pd_service_discovery.go (100%) rename client/{sd => servicediscovery}/pd_service_discovery_test.go (100%) rename client/{sd => servicediscovery}/tso_service_discovery.go (100%) diff --git a/client/client.go b/client/client.go index b3a3eb3b900..ef6feeb26ee 100644 --- a/client/client.go +++ b/client/client.go @@ -35,7 +35,7 @@ import ( "github.com/tikv/pd/client/clients/metastorage" "github.com/tikv/pd/client/errs" "github.com/tikv/pd/client/opt" - "github.com/tikv/pd/client/sd" + sd "github.com/tikv/pd/client/servicediscovery" "github.com/tikv/pd/client/utils" "github.com/tikv/pd/client/utils/tlsutil" "go.uber.org/zap" diff --git a/client/http/client.go b/client/http/client.go index 8c24efce0f2..9c522d87286 100644 --- a/client/http/client.go +++ b/client/http/client.go @@ -28,7 +28,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/tikv/pd/client/errs" "github.com/tikv/pd/client/retry" - "github.com/tikv/pd/client/sd" + sd "github.com/tikv/pd/client/servicediscovery" "go.uber.org/zap" ) diff --git a/client/sd/mock_pd_service_discovery.go b/client/servicediscovery/mock_pd_service_discovery.go similarity index 100% rename from client/sd/mock_pd_service_discovery.go rename to client/servicediscovery/mock_pd_service_discovery.go diff --git a/client/sd/pd_service_discovery.go b/client/servicediscovery/pd_service_discovery.go similarity index 100% rename from client/sd/pd_service_discovery.go rename to client/servicediscovery/pd_service_discovery.go diff --git a/client/sd/pd_service_discovery_test.go b/client/servicediscovery/pd_service_discovery_test.go similarity index 100% rename from client/sd/pd_service_discovery_test.go rename to client/servicediscovery/pd_service_discovery_test.go diff --git a/client/sd/tso_service_discovery.go b/client/servicediscovery/tso_service_discovery.go similarity index 100% rename from client/sd/tso_service_discovery.go rename to client/servicediscovery/tso_service_discovery.go diff --git a/client/tso_client.go b/client/tso_client.go index b4024f61117..ec3676b5b14 100644 --- a/client/tso_client.go +++ b/client/tso_client.go @@ -27,7 +27,7 @@ import ( "github.com/pingcap/log" "github.com/tikv/pd/client/errs" "github.com/tikv/pd/client/opt" - "github.com/tikv/pd/client/sd" + sd "github.com/tikv/pd/client/servicediscovery" "github.com/tikv/pd/client/utils/grpcutil" "github.com/tikv/pd/client/utils/tlsutil" "go.uber.org/zap" diff --git a/client/tso_dispatcher.go b/client/tso_dispatcher.go index 5f162a68971..714d9e8be54 100644 --- a/client/tso_dispatcher.go +++ b/client/tso_dispatcher.go @@ -31,7 +31,7 @@ import ( "github.com/tikv/pd/client/errs" "github.com/tikv/pd/client/opt" "github.com/tikv/pd/client/retry" - "github.com/tikv/pd/client/sd" + sd "github.com/tikv/pd/client/servicediscovery" "github.com/tikv/pd/client/utils/timerutil" "github.com/tikv/pd/client/utils/tsoutil" "go.uber.org/zap" diff --git a/client/tso_dispatcher_test.go b/client/tso_dispatcher_test.go index c3b4f6e4031..6cb963df3df 100644 --- a/client/tso_dispatcher_test.go +++ b/client/tso_dispatcher_test.go @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "github.com/tikv/pd/client/opt" - "github.com/tikv/pd/client/sd" + sd "github.com/tikv/pd/client/servicediscovery" "go.uber.org/zap/zapcore" ) diff --git a/tests/integrations/client/client_test.go b/tests/integrations/client/client_test.go index c06b8304da6..42dbb877b09 100644 --- a/tests/integrations/client/client_test.go +++ b/tests/integrations/client/client_test.go @@ -40,7 +40,7 @@ import ( pd "github.com/tikv/pd/client" "github.com/tikv/pd/client/opt" "github.com/tikv/pd/client/retry" - "github.com/tikv/pd/client/sd" + sd "github.com/tikv/pd/client/servicediscovery" "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/mcs/utils/constant" "github.com/tikv/pd/pkg/mock/mockid" diff --git a/tests/integrations/mcs/resourcemanager/resource_manager_test.go b/tests/integrations/mcs/resourcemanager/resource_manager_test.go index 8f7715a35f5..d3e3a089006 100644 --- a/tests/integrations/mcs/resourcemanager/resource_manager_test.go +++ b/tests/integrations/mcs/resourcemanager/resource_manager_test.go @@ -33,7 +33,7 @@ import ( "github.com/stretchr/testify/suite" pd "github.com/tikv/pd/client" "github.com/tikv/pd/client/resource_group/controller" - "github.com/tikv/pd/client/sd" + sd "github.com/tikv/pd/client/servicediscovery" "github.com/tikv/pd/pkg/mcs/resourcemanager/server" "github.com/tikv/pd/pkg/utils/testutil" "github.com/tikv/pd/pkg/utils/typeutil" diff --git a/tests/integrations/tso/client_test.go b/tests/integrations/tso/client_test.go index 4ac72d3350b..0e063028f0f 100644 --- a/tests/integrations/tso/client_test.go +++ b/tests/integrations/tso/client_test.go @@ -30,7 +30,7 @@ import ( "github.com/stretchr/testify/suite" pd "github.com/tikv/pd/client" "github.com/tikv/pd/client/opt" - "github.com/tikv/pd/client/sd" + sd "github.com/tikv/pd/client/servicediscovery" "github.com/tikv/pd/client/utils/testutil" bs "github.com/tikv/pd/pkg/basicserver" "github.com/tikv/pd/pkg/mcs/utils/constant" diff --git a/tools/pd-simulator/simulator/client.go b/tools/pd-simulator/simulator/client.go index b92e6609764..4de2ea52f88 100644 --- a/tools/pd-simulator/simulator/client.go +++ b/tools/pd-simulator/simulator/client.go @@ -27,7 +27,7 @@ import ( "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/kvproto/pkg/pdpb" pdHttp "github.com/tikv/pd/client/http" - "github.com/tikv/pd/client/sd" + sd "github.com/tikv/pd/client/servicediscovery" "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/utils/typeutil" sc "github.com/tikv/pd/tools/pd-simulator/simulator/config" diff --git a/tools/pd-simulator/simulator/drive.go b/tools/pd-simulator/simulator/drive.go index 8a1e33ecac2..c8c325cfca6 100644 --- a/tools/pd-simulator/simulator/drive.go +++ b/tools/pd-simulator/simulator/drive.go @@ -31,7 +31,7 @@ import ( "github.com/pingcap/kvproto/pkg/pdpb" "github.com/prometheus/client_golang/prometheus/promhttp" pdHttp "github.com/tikv/pd/client/http" - "github.com/tikv/pd/client/sd" + sd "github.com/tikv/pd/client/servicediscovery" "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/utils/typeutil" "github.com/tikv/pd/tools/pd-simulator/simulator/cases"