MCPcopy
hub / github.com/AlistGo/alist / TokenBucket

Interface TokenBucket

drivers/local/token_bucket.go:5–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import "context"
4
5type TokenBucket interface {
6 Take() <-chan struct{}
7 Put()
8 Do(context.Context, func() error) error
9}
10
11// StaticTokenBucket is a bucket with a fixed number of tokens,
12// where the retrieval and return of tokens are manually controlled.

Callers 17

GetShareByShareIDFunction · 0.65
RecordShareAccessFunction · 0.65
upPartMethod · 0.65
PutMethod · 0.65
RequestMethod · 0.65
RequestToMethod · 0.65
uploadFileMethod · 0.65
PutMethod · 0.65
InitMethod · 0.65
upRemoteMethod · 0.65
upOneDriveMethod · 0.65

Implementers 2

StaticTokenBucketdrivers/local/token_bucket.go
NopTokenBucketdrivers/local/token_bucket.go

Calls

no outgoing calls

Tested by

no test coverage detected