design: add design for rate limiting (#36)
I added an example for how rate limiting should be implemented using middleware. Fixes #22 ## Motivation and Context <!-- Why is this change needed? What problem does it solve? --> Rate limiting can be enabled using middleware. This adds an example on how to do that. ## How Has This Been Tested? <!-- Have you tested this in a real application? Which scenarios were tested? --> N/A ## Breaking Changes <!-- Will users need to update their code or configurations? --> No ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [x] Documentation update ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [x] I have added or updated documentation as needed ## Additional context <!-- Add any other context, implementation notes, or design decisions -->
This commit is contained in:
parent
032c62c8ad
commit
bc59932176
1 changed files with 74 additions and 0 deletions
8
examples/rate-limiting/go.mod
Normal file
8
examples/rate-limiting/go.mod
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
module github.com/modelcontextprotocol/go-sdk/examples/rate-limiting
|
||||
|
||||
go 1.25
|
||||
|
||||
require (
|
||||
github.com/modelcontextprotocol/go-sdk v0.0.0-20250625185707-09181c2c2e89
|
||||
golang.org/x/time v0.12.0
|
||||
)
|
||||
Loading…
Reference in a new issue