Skip to content

Commit

Permalink
fix cluster definition
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenlj committed Nov 4, 2023
1 parent 2087cff commit 11f3eff
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cluster/cluster/adaptivesvc/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
var _ protocol.Invoker = (*adaptiveServiceClusterInvoker)(nil)

Check failure on line 41 in cluster/cluster/adaptivesvc/cluster_invoker.go

View workflow job for this annotation

GitHub Actions / lint (1.17)

cannot use (*adaptiveServiceClusterInvoker)(nil) (value of type *adaptiveServiceClusterInvoker) as protocol.Invoker value in variable declaration: missing method Destroy (typecheck)

type adaptiveServiceClusterInvoker struct {
base.BaseClusterInvoker
*base.BaseClusterInvoker
}

func newAdaptiveServiceClusterInvoker(directory directory.Directory) protocol.Invoker {
Expand Down
2 changes: 1 addition & 1 deletion cluster/cluster/available/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
)

type availableClusterInvoker struct {
base.BaseClusterInvoker
*base.BaseClusterInvoker
}

// NewClusterInvoker returns a availableCluster invoker instance
Expand Down
4 changes: 2 additions & 2 deletions cluster/cluster/base/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ type BaseClusterInvoker struct {
StickyInvoker protocol.Invoker
}

func NewBaseClusterInvoker(directory directory.Directory) BaseClusterInvoker {
return BaseClusterInvoker{
func NewBaseClusterInvoker(directory directory.Directory) *BaseClusterInvoker {
return &BaseClusterInvoker{
Directory: directory,
AvailableCheck: true,
Destroyed: atomic.NewBool(false),
Expand Down
2 changes: 1 addition & 1 deletion cluster/cluster/broadcast/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
)

type broadcastClusterInvoker struct {
base.BaseClusterInvoker
*base.BaseClusterInvoker
}

func newBroadcastClusterInvoker(directory directory.Directory) protocol.Invoker {
Expand Down
2 changes: 1 addition & 1 deletion cluster/cluster/failback/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import (
* <a href="http://en.wikipedia.org/wiki/Failback">Failback</a>
*/
type failbackClusterInvoker struct {
base.BaseClusterInvoker
*base.BaseClusterInvoker

once sync.Once
ticker *time.Ticker
Expand Down
2 changes: 1 addition & 1 deletion cluster/cluster/failfast/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

type failfastClusterInvoker struct {
base.BaseClusterInvoker
*base.BaseClusterInvoker
}

func newFailfastClusterInvoker(directory directory.Directory) protocol.Invoker {
Expand Down
2 changes: 1 addition & 1 deletion cluster/cluster/failover/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
)

type failoverClusterInvoker struct {
base.BaseClusterInvoker
*base.BaseClusterInvoker
}

func newFailoverClusterInvoker(directory directory.Directory) protocol.Invoker {
Expand Down
2 changes: 1 addition & 1 deletion cluster/cluster/failsafe/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
*
*/
type failsafeClusterInvoker struct {
base.BaseClusterInvoker
*base.BaseClusterInvoker
}

func newFailsafeClusterInvoker(directory directory.Directory) protocol.Invoker {
Expand Down
2 changes: 1 addition & 1 deletion cluster/cluster/forking/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
)

type forkingClusterInvoker struct {
base.BaseClusterInvoker
*base.BaseClusterInvoker
}

func newForkingClusterInvoker(directory directory.Directory) protocol.Invoker {
Expand Down
2 changes: 1 addition & 1 deletion cluster/cluster/zoneaware/cluster_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
// 3. Evenly balance traffic between all registries based on each registry's weight.
// 4. Pick anyone that's available.
type zoneawareClusterInvoker struct {
base.BaseClusterInvoker
*base.BaseClusterInvoker
}

func newZoneawareClusterInvoker(directory directory.Directory) protocol.Invoker {
Expand Down

0 comments on commit 11f3eff

Please sign in to comment.