-
Notifications
You must be signed in to change notification settings - Fork 911
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an archival.Module to be used in both tests and prod
- Loading branch information
1 parent
dd3e631
commit 81fac5e
Showing
6 changed files
with
61 additions
and
1 deletion.
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,20 @@ | ||
package archival | ||
|
||
import ( | ||
"math" | ||
|
||
"go.uber.org/fx" | ||
|
||
"go.temporal.io/server/common/quotas" | ||
"go.temporal.io/server/service/history/configs" | ||
) | ||
|
||
var Module = fx.Options( | ||
fx.Provide(NewArchiver), | ||
fx.Provide(func(config *configs.Config) quotas.RateLimiter { | ||
return quotas.NewRateLimiter( | ||
config.ArchivalBackendMaxRPS(), | ||
int(math.Ceil(config.ArchivalBackendMaxRPS())), | ||
) | ||
}), | ||
) |
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