Documentation
¶
Overview ¶
Copyright 2019 The Vearch Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketRateLimit ¶
type BucketRateLimit struct {
// contains filtered or unexported fields
}
func (*BucketRateLimit) Wait ¶
func (r *BucketRateLimit) Wait(n int64) bool
type ConcurrentLimit ¶
type ConcurrentLimit struct {
// contains filtered or unexported fields
}
func NewConcurrentLimit ¶
func NewConcurrentLimit(c int, timeout time.Duration) *ConcurrentLimit
func (*ConcurrentLimit) Close ¶
func (c *ConcurrentLimit) Close()
func (*ConcurrentLimit) GetToken ¶
func (c *ConcurrentLimit) GetToken() bool
func (*ConcurrentLimit) PutToken ¶
func (c *ConcurrentLimit) PutToken()
type NullRateLimit ¶
type NullRateLimit struct{}
func (*NullRateLimit) Wait ¶
func (r *NullRateLimit) Wait(n int64) bool
Click to show internal directories.
Click to hide internal directories.