1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-31 05:04:23 +03:00

Remove SetLimiter

This commit is contained in:
Vladimir Mihailenco
2020-02-02 11:09:27 +02:00
parent 4eb2debcdc
commit db45a825cc
3 changed files with 12 additions and 14 deletions

View File

@ -21,8 +21,8 @@ type Limiter interface {
// If operation is allowed client must ReportResult of the operation
// whether it is a success or a failure.
Allow() error
// ReportResult reports the result of previously allowed operation.
// nil indicates a success, non-nil error indicates a failure.
// ReportResult reports the result of the previously allowed operation.
// nil indicates a success, non-nil error usually indicates a failure.
ReportResult(result error)
}
@ -96,6 +96,9 @@ type Options struct {
// TLS Config to use. When set TLS will be negotiated.
TLSConfig *tls.Config
// Limiter interface used to implemented circuit breaker or rate limiter.
Limiter Limiter
}
func (opt *Options) init() {