MCPcopy Index your code
hub / github.com/Clever/leakybucket

github.com/Clever/leakybucket @v1.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.3.0 ↗ · + Follow
91 symbols 278 edges 13 files 39 documented · 43%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

leakybucket

Leaky bucket implementation in Go with your choice of data storage layer.

Why

Leaky buckets are useful in a number of settings, especially rate limiting.

Documentation

GoDoc.

Tests

leakybucket is built and tested against Go 1.5. Ensure this is the version of Go you're running with go version. Make sure your GOPATH is set, e.g. export GOPATH=~/go. Clone the repository to $GOPATH/src/github.com/Clever/leakybucket.

If you have done all of the above, then you should be able to run

make test

Extension points exported contracts — how you extend this code

Bucket (Interface)
Bucket interface for interacting with leaky buckets: https://en.wikipedia.org/wiki/Leaky_bucket [3 implementers]
bucket.go
Storage (Interface)
Storage interface for generating buckets keyed by a string. [3 implementers]
bucket.go

Core symbols most depended-on inside this repo

Add
called by 28
bucket.go
Create
called by 10
bucket.go
New
called by 7
memory/memory.go
Remaining
called by 6
bucket.go
Reset
called by 6
bucket.go
state
called by 6
dynamodb/bucket.go
State
called by 5
redis/redis.go
bucket
called by 4
dynamodb/db.go

Shape

Function 46
Method 32
Struct 11
Interface 2

Languages

Go100%

Modules by API surface

dynamodb/db.go14 symbols
dynamodb/bucket.go13 symbols
redis/redis.go11 symbols
redis/redis_test.go10 symbols
dynamodb/bucket_test.go10 symbols
test/test.go8 symbols
memory/memory.go8 symbols
bucket.go8 symbols
memory/memory_test.go7 symbols
dynamodb/db_test.go2 symbols

For agents

$ claude mcp add leakybucket \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact