Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
whalecold committed Sep 2, 2024
1 parent 50ee83e commit 0885fa5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions xdssuite/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ import (
"github.com/kitex-contrib/xds/core/xdsresource"
)

type retrySuit struct {
type retrySuite struct {
lastPolicies atomic.Value
*retry.Container
router *XDSRouter
matchMethod bool
}

func updateRetryPolicy(rc *retrySuit, res map[string]xdsresource.Resource) {
func updateRetryPolicy(rc *retrySuite, res map[string]xdsresource.Resource) {
lastPolicies := make(map[string]struct{})
val := rc.lastPolicies.Load()
if val != nil {
Expand Down Expand Up @@ -120,7 +120,7 @@ func NewRetryPolicy(opts ...Option) client.Option {
panic("xds resource manager has not been initialized")
}

rs := &retrySuit{
rs := &retrySuite{
router: NewXDSRouter(opts...),
matchMethod: opt.matchRetryMethod,
}
Expand All @@ -134,7 +134,7 @@ func NewRetryPolicy(opts ...Option) client.Option {

// keep consistent when initialising the circuit breaker suit and updating
// the retry policy.
func (rs *retrySuit) genRetryServiceKey(ctx context.Context, ri rpcinfo.RPCInfo) string {
func (rs *retrySuite) genRetryServiceKey(ctx context.Context, ri rpcinfo.RPCInfo) string {
if ri == nil {
return ""
}
Expand All @@ -161,7 +161,7 @@ func (rs *retrySuit) genRetryServiceKey(ctx context.Context, ri rpcinfo.RPCInfo)
return rs.retryPolicyKey(res.ClusterPicked, dest.Method())
}

func (rs *retrySuit) retryPolicyKey(cluster, method string) string {
func (rs *retrySuite) retryPolicyKey(cluster, method string) string {
if !rs.matchMethod {
return cluster
}
Expand Down
2 changes: 1 addition & 1 deletion xdssuite/retry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func dump(in interface{}) interface{} {
}

func TestRetry(t *testing.T) {
r := &retrySuit{
r := &retrySuite{
Container: retry.NewRetryContainer(),
}

Expand Down

0 comments on commit 0885fa5

Please sign in to comment.