func (r *RateLimit) Bucket(key string) *Bucket {
	var bucket *Bucket
	var exists bool

	r.mu.Lock()
	if bucket, exists = r.buckets[key]; !exists {
		r.buckets[key] = &Bucket{
			endpoint: key,
			reset:    r.TimeDiff.Now().UnixNano() / int64(time.Millisecond),
		}
		bucket = r.buckets[key]
	}
	r.mu.Unlock()

	return bucket
}
// Bucket returns a bucket given the key (or ID) for a rate limit bucket. If
// no bucket exists for the key, one will be created.
Bucket returns a bucket given the key (or ID) for a rate limit bucket. If
no bucket exists for the key, one will be created.
// Bucket returns a bucket given the key ( or ID ) for a rate limit bucket . If // no bucket exists for the key one will be created .
func (r *RateLimit) Bucket(key string) *Bucket {
	var bucket *Bucket
	var exists bool
	r.mu.Lock()
	if bucket, exists = r.buckets[key]; !exists {
		r.buckets[key] = &Bucket{
			endpoint: key,
			reset:    r.TimeDiff.Now().UnixNano() / int64(time.Millisecond),
		}
		bucket = r.buckets[key]
	}
	r.mu.Unlock()
	return bucket
}
func ( r * RateLimit ) Bucket ( key string ) * Bucket { var bucket * Bucket var exists bool r . mu . Lock ( ) if bucket , exists = r . buckets [ key ] ; ! exists { r . buckets [ key ] = & Bucket { endpoint : key , reset : r . TimeDiff . Now ( ) . UnixNano ( ) / int64 ( time . Millisecond ) , } bucket = r . buckets [ key ] } r . mu . Unlock ( ) return bucket }
Bucket returns a bucket given the key (or ID) for a rate limit bucket.
Bucket returns a bucket given the key ( or ID ) for a rate limit bucket .