fluxninja / aperture

Rate limiting, caching, and request prioritization for modern workloads
https://docs.fluxninja.com
Apache License 2.0
641 stars 25 forks source link

Add Executable Examples in Typescript SDK #3032

Closed karansohi closed 11 months ago

karansohi commented 11 months ago

Description of change

Checklist

Summary by CodeRabbit

coderabbitai[bot] commented 11 months ago

Walkthrough

The changes involve updates to documentation and examples for rate limiting using the Aperture SDK. They include renaming file paths, refining the SDK's usage instructions, and adding new code examples for initializing the Aperture client and handling request rate limits. The updates aim to enhance the user experience in setting up and monitoring rate limiting policies with the Aperture Cloud UI and aperturectl.

Changes

File Path Change Summary
docs/.../validate.sh Updated file paths for policy and graph files.
docs/.../per-user-rate-limiting.md Updated documentation and examples for rate limiting with Aperture SDK; added UI and aperturectl instructions.
sdks/.../quota_scheduler_example.ts Introduced new module with functions for Aperture client initialization and request scheduling; added inquirer dependency.
sdks/.../rate_limit_example.ts Added new functions for Aperture client initialization and rate limit handling; updated main function.

🐇✨ In the land of code, where the data streams flow,
A rabbit hopped in, with updates in tow.
With a tweak and a fix, and a doc so bright,
Rate limits set right, into the digital night. 🌙
🌟🐾


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - If you reply to a *review comment* from CodeRabbit, the bot will automatically respond. - To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment - Note: Review comments are made on code diffs or files, not on the PR overview. - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Note: For conversation with the bot, please use the review comments on code diffs or files. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json`