编写 Rust Lambda 函数的中间件
https://lobste.rs/
1.
2 (https://lobste.rs/login)
Writing middlewares for Rust Lambda functions (https://loige.co/writing-middlewares-for-rust-lambda-functions/)☶ (https://lobste.rs/s/pp5yza/writing_middlewares_for_rust_lambda)rust (https://lobste.rs/t/rust)web (https://lobste.rs/t/web)loige.co (https://lobste.rs/domains/loige.co)
authored byhttps://lobste.rs/~loigeloige (https://lobste.rs/~loige)2 months ago |
caches
• Archive.org (https://web.archive.org/web/3/https%3A%2F%2Floige.co%2Fwriting-middlewares-for-rust-lambda-functions%2F)
• Ghostarchive (https://ghostarchive.org/search?term=https%3A%2F%2Floige.co%2Fwriting-middlewares-for-rust-lambda-functions%2F)
| 2 comments (https://lobste.rs/c/ahkdr8#comments-pp5yza)
A practical look at using tower as the middleware layer for Rust AWS Lambda functions, with examples that build up to a DynamoDB-backed per-IP rate limiter. It covers Service, Layer, stack ordering, short-circuiting, boxed async futures, and testing middleware without deploying a Lambda.
1. Preview
2. 1. - [x] 2 (https://lobste.rs/login) https://lobste.rs/c/ahkdr8https://lobste.rs/~alperalper (https://lobste.rs/~alper)15 days ago (https://lobste.rs/c/9sqnoo) > These look intimidating the first time you see them, but they are boilerplate.
Yeah, I don't really miss the trait gobbledygook that is Rust. Takes all the fun out of what is an otherwise pretty cool language.
1. - [x] ~ (https://lobste.rs/login) https://lobste.rs/c/ahkdr8https://lobste.rs/~loigeloige (https://lobste.rs/~loige)2 minutes ago (https://lobste.rs/c/ahkdr8) Would you rather prefer something more duck-typed a-la-go or is there some other approach that you think would be more ergonomic? Not challenging, genuinely curious...