Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce common directory #1948

Merged
merged 9 commits into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions cluster/cluster/adaptivesvc/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,17 @@ package adaptivesvc
import (
"context"
"strconv"
)

import (
perrors "github.com/pkg/errors"
)

import (
"dubbo.apache.org/dubbo-go/v3/cluster/cluster/base"
"dubbo.apache.org/dubbo-go/v3/cluster/directory"
"dubbo.apache.org/dubbo-go/v3/cluster/metrics"
perrors "github.com/pkg/errors"
Leospard marked this conversation as resolved.
Show resolved Hide resolved

clsutils "dubbo.apache.org/dubbo-go/v3/cluster/utils"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/extension"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/protocol"
"github.com/dubbogo/gost/log/logger"
)

var _ protocol.Invoker = (*adaptiveServiceClusterInvoker)(nil)
Expand Down
7 changes: 2 additions & 5 deletions cluster/cluster/base/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,14 @@ package base
import (
perrors "github.com/pkg/errors"

"go.uber.org/atomic"
)

import (
"dubbo.apache.org/dubbo-go/v3/cluster/directory"
"dubbo.apache.org/dubbo-go/v3/cluster/loadbalance"
"dubbo.apache.org/dubbo-go/v3/common"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/extension"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/protocol"
"github.com/dubbogo/gost/log/logger"
"go.uber.org/atomic"
)

type BaseClusterInvoker struct {
Expand Down
4 changes: 1 addition & 3 deletions cluster/cluster/broadcast/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ package broadcast

import (
"context"
)

import (
"dubbo.apache.org/dubbo-go/v3/cluster/cluster/base"
"dubbo.apache.org/dubbo-go/v3/cluster/directory"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/protocol"
"github.com/dubbogo/gost/log/logger"
)

type broadcastClusterInvoker struct {
Expand Down
9 changes: 2 additions & 7 deletions cluster/cluster/failback/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,15 @@ import (
"strconv"
"sync"
"time"
)

import (
"github.com/Workiva/go-datastructures/queue"
)

import (
"dubbo.apache.org/dubbo-go/v3/cluster/cluster/base"
"dubbo.apache.org/dubbo-go/v3/cluster/directory"
"dubbo.apache.org/dubbo-go/v3/cluster/loadbalance"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/extension"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/protocol"
"github.com/Workiva/go-datastructures/queue"
"github.com/dubbogo/gost/log/logger"
)

/**
Expand Down
9 changes: 2 additions & 7 deletions cluster/cluster/failover/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,14 @@ import (
"context"
"fmt"
"strconv"
)

import (
perrors "github.com/pkg/errors"
)

import (
"dubbo.apache.org/dubbo-go/v3/cluster/cluster/base"
"dubbo.apache.org/dubbo-go/v3/cluster/directory"
"dubbo.apache.org/dubbo-go/v3/common"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/protocol"
"github.com/dubbogo/gost/log/logger"
perrors "github.com/pkg/errors"
)

type failoverClusterInvoker struct {
Expand Down
4 changes: 1 addition & 3 deletions cluster/cluster/failsafe/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ package failsafe

import (
"context"
)

import (
"dubbo.apache.org/dubbo-go/v3/cluster/cluster/base"
"dubbo.apache.org/dubbo-go/v3/cluster/directory"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/extension"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/protocol"
"github.com/dubbogo/gost/log/logger"
)

/**
Expand Down
9 changes: 2 additions & 7 deletions cluster/cluster/forking/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,13 @@ import (
"context"
"fmt"
"time"
)

import (
"github.com/Workiva/go-datastructures/queue"
)

import (
"dubbo.apache.org/dubbo-go/v3/cluster/cluster/base"
"dubbo.apache.org/dubbo-go/v3/cluster/directory"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/protocol"
"github.com/Workiva/go-datastructures/queue"
"github.com/dubbogo/gost/log/logger"
)

type forkingClusterInvoker struct {
Expand Down
9 changes: 2 additions & 7 deletions cluster/cluster/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,12 @@ package cluster

import (
"context"
)

import (
perrors "github.com/pkg/errors"
)

import (
"dubbo.apache.org/dubbo-go/v3/cluster/directory"
"dubbo.apache.org/dubbo-go/v3/common"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/protocol"
"github.com/dubbogo/gost/log/logger"
perrors "github.com/pkg/errors"
)

var Count int
Expand Down
4 changes: 1 addition & 3 deletions cluster/loadbalance/p2c/loadbalance.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ import (
"math/rand"
"sync"
"time"
)

import (
"dubbo.apache.org/dubbo-go/v3/cluster/loadbalance"
"dubbo.apache.org/dubbo-go/v3/cluster/metrics"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/extension"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/protocol"
"github.com/dubbogo/gost/log/logger"
)

var (
Expand Down
4 changes: 1 addition & 3 deletions cluster/loadbalance/ringhash/ringhash.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ package ringhash

import (
"strconv"
)

import (
"dubbo.apache.org/dubbo-go/v3/cluster/loadbalance"
"dubbo.apache.org/dubbo-go/v3/common"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/extension"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/protocol"
"dubbo.apache.org/dubbo-go/v3/remoting/xds"
"github.com/dubbogo/gost/log/logger"
)

func init() {
Expand Down
12 changes: 3 additions & 9 deletions cluster/router/chain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,14 @@ package chain
import (
"sort"
"sync"
)

import (
perrors "github.com/pkg/errors"

"go.uber.org/atomic"
)

import (
"dubbo.apache.org/dubbo-go/v3/cluster/router"
"dubbo.apache.org/dubbo-go/v3/common"
"dubbo.apache.org/dubbo-go/v3/common/extension"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/protocol"
"github.com/dubbogo/gost/log/logger"
perrors "github.com/pkg/errors"
"go.uber.org/atomic"
)

// RouterChain Router chain
Expand Down
4 changes: 1 addition & 3 deletions cluster/router/meshrouter/meshrouter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ package meshrouter

import (
"math/rand"
)

import (
"dubbo.apache.org/dubbo-go/v3/cluster/router"
"dubbo.apache.org/dubbo-go/v3/common"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/config_center"
"dubbo.apache.org/dubbo-go/v3/protocol"
"dubbo.apache.org/dubbo-go/v3/remoting/xds"
"github.com/dubbogo/gost/log/logger"
)

const (
Expand Down
4 changes: 1 addition & 3 deletions cluster/router/tag/match.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ package tag

import (
"strconv"
)

import (
"dubbo.apache.org/dubbo-go/v3/common"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/config"
"dubbo.apache.org/dubbo-go/v3/protocol"
"github.com/dubbogo/gost/log/logger"
)

type predicate func(invoker protocol.Invoker, tag interface{}) bool
Expand Down
8 changes: 2 additions & 6 deletions cluster/router/tag/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,17 @@ package tag
import (
"strings"
"sync"
)

import (
"dubbo.apache.org/dubbo-go/v3/common"
"gopkg.in/yaml.v2"
)

import (
"dubbo.apache.org/dubbo-go/v3/common"
conf "dubbo.apache.org/dubbo-go/v3/common/config"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/config"
"dubbo.apache.org/dubbo-go/v3/config_center"
"dubbo.apache.org/dubbo-go/v3/protocol"
"dubbo.apache.org/dubbo-go/v3/remoting"
"github.com/dubbogo/gost/log/logger"
)

type PriorityRouter struct {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions common/extension/proxy_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
package extension

import (
"dubbo.apache.org/dubbo-go/v3/common/logger"
"dubbo.apache.org/dubbo-go/v3/common/proxy"
"dubbo.apache.org/dubbo-go/v3/proxy"
"github.com/dubbogo/gost/log/logger"
)

var proxyFactories = make(map[string]func(...proxy.Option) proxy.ProxyFactory)
Expand Down
36 changes: 0 additions & 36 deletions common/logger/file_log.yml

This file was deleted.

Loading