Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Defaultopt = Options{
MaxBurst: 99,
CountPerPeriod: 30,
Period: 60,
}
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
Apply(*Options)
}
Option configures how we set up the connection.
func WithCountPerPeriod ¶
WithCountPerPeriod 设置时间间隔内的token消减数
func WithMaxBurst ¶
WithMaxBurst 设置最大熔断数,最大token数为MaxBurst+1
Click to show internal directories.
Click to hide internal directories.