1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-07 21:47:02 +09:00
any-sync/net/rpc/limiter/config.go
2024-03-28 16:28:00 +01:00

15 lines
290 B
Go

package limiter
type ConfigGetter interface {
GetLimiterConf() Config
}
type Tokens struct {
TokensPerSecond int `yaml:"rps"`
MaxTokens int `yaml:"burst"`
}
type Config struct {
DefaultTokens Tokens `yaml:"default"`
ResponseTokens map[string]Tokens `yaml:"rpc"`
}