mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-07 21:47:02 +09:00
15 lines
290 B
Go
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"`
|
|
}
|