-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Zero retryLimit Support in ReplayClient (#442)
Co-authored-by: Bryan White <[email protected]> Co-authored-by: Daniel Olshansky <[email protected]> Co-authored-by: Redouane Lakrache <[email protected]>
- Loading branch information
1 parent
3dee9c1
commit c6cb4d0
Showing
16 changed files
with
302 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package block | ||
|
||
import "github.com/pokt-network/poktroll/pkg/client" | ||
|
||
// WithConnRetryLimit returns an option function which sets the number | ||
// of times the underlying replay client should retry in the event that it encounters | ||
// an error or its connection is interrupted. | ||
// If connRetryLimit is < 0, it will retry indefinitely. | ||
func WithConnRetryLimit(limit int) client.BlockClientOption { | ||
return func(client client.BlockClient) { | ||
client.(*blockReplayClient).connRetryLimit = limit | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package delegation | ||
|
||
import "github.com/pokt-network/poktroll/pkg/client" | ||
|
||
// WithConnRetryLimit returns an option function which sets the number | ||
// of times the underlying replay client should retry in the event that it encounters | ||
// an error or its connection is interrupted. | ||
// If connRetryLimit is < 0, it will retry indefinitely. | ||
func WithConnRetryLimit(limit int) client.DelegationClientOption { | ||
return func(client client.DelegationClient) { | ||
client.(*delegationClient).connRetryLimit = limit | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.