Skip to content

Commit

Permalink
Update distributed_gobreaker.go
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiyukiMineo authored Dec 28, 2024
1 parent 0fd1158 commit 89b3835
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions v2/distributed_gobreaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gobreaker
import (
"context"
"encoding/json"
"fmt"
"errors"
"time"
)

Expand Down Expand Up @@ -44,7 +44,7 @@ func NewDistributedCircuitBreaker[T any](ctx context.Context, store SharedDataSt
CircuitBreaker: NewCircuitBreaker[T](settings),
store: store,
}
err := dcb.setSharedState(ctx, cb.state)
err := dcb.setSharedState(ctx, dcb.state)
return dcb, err
}

Expand Down Expand Up @@ -104,7 +104,7 @@ func (dcb *DistributedCircuitBreaker[T]) State(ctx context.Context) (State, erro
}

// Execute runs the given request if the DistributedCircuitBreaker accepts it.
func (dcb *DistributedCircuitBreaker[T]) Execute(ctx context.Context, req func() (T, error)) (T, err error) {
func (dcb *DistributedCircuitBreaker[T]) Execute(ctx context.Context, req func() (T, error)) (t T, err error) {
generation, err := dcb.beforeRequest(ctx)
if err != nil {
var defaultValue T
Expand Down

0 comments on commit 89b3835

Please sign in to comment.