Documentation
¶
Overview ¶
Package rateplan provides the schedulable rate limit writer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrParseRatePlan = errors.New("can't convert a string into RatePlan")
)
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock interface {
// Now returns the current time.
Now() time.Time
// Sleep sleeps for at least the given duration.
Sleep(time.Duration)
}
Clock represents the passage of time in a way that can be faked out for tests.
type RatePlan ¶
type RatePlan struct {
// contains filtered or unexported fields
}
func NewRatePlanClock ¶
func ParseRatePlan ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.