34 Commits

Author SHA1 Message Date
Jonas Platte
b43d700819
Fix clippy warnings in warp-key-value-store (#637) 2026-01-21 00:14:38 +09:00
tottoto
7be16d21b9
examples: Update to reqwest 0.13 (#640) 2026-01-17 13:52:12 +09:00
tottoto
d007c82a5e
examples: Disable unused reqwest feature (#632) 2026-01-12 22:35:01 +01:00
tottoto
ab4989c2fa
examples: Use typed default value clap config (#634) 2026-01-12 19:30:32 +01:00
Falk Woldmann Lu
50beeafbf9
Add support for custom status code in TimeoutLayer (#599) 2025-10-14 21:37:54 +02:00
tottoto
c757491af0
examples: Update to axum 0.8 (#602) 2025-08-22 08:11:20 -04:00
tottoto
6630891c1e
examples: Drop protoc dependency (#601) 2025-08-21 22:43:07 +02:00
tottoto
7875e33a5f
chore(examples): resolve clap deprecated api (#595) 2025-08-09 12:48:53 +02:00
tottoto
d94d7f8062
chore(examples): update to tonic 0.14 (#594) 2025-08-09 12:15:05 +02:00
tottoto
b7b3783212
chore(examples): Update to warp 0.4 (#593) 2025-08-09 12:12:21 +02:00
tottoto
93d31c199d
Replace futures with futures-util in examples dependency (#435) 2024-11-23 08:56:46 +01:00
Paolo Barbolini
3f98dc19bc
Bump tower to v0.5 (#503) 2024-08-13 22:38:21 +02:00
Oliver THEBAULT
ed963f189d
examples: Migrate axum-key-value-store to hyper 1 2024-01-13 21:36:35 +01:00
David Pedersen
04361b76a7
Upgrade to http-body 1.0 (#348)
* punt on examples for now

* remove dependency on hyper

* port to http-body 1.0

* note which types from http_body_util is in our public api

* wrap body types

* fix some warnings

* comment out compression stuff for now

* validate-request docs

* trace

* timeout

* set_status

* set_header

* serve_dir

* redirect

* follow_redirect

* sensitive_headers

* request_id

* propagate_header

* normalize_path

* in_flight_requests

* map_response_body

* map_request_body

* limit

* lib

* cors

* classify

* add_extension

* catch_panic

* add_authorization

* require_authorization + async_require_authorization

* builder

* format

* fixes

* fix docs

* fix cargo hack

* is this breaking patches in Cargo.toml?

* update to 1.0 of dependencies

* porting compression like this seems to work \o/

* use `BodyExt::collect` in tests

* compression is back!

* and thats decompression!

* remove hyper specific test

* Update examples/axum-key-value-store/src/main.rs

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

* bring back client examples

* fix doc tests

* forgot ServiceBuilderExt

* changelog

* Fix potential ordering issues with `BodyIntoStream`

* don't delegate `is_end_stream`

* fix typos

* use std::task::ready

* uncomment CompressionLayer in examples

* Derive default

* format

* bring back hyper compat test

* remove lint. Lets just add this back later. Wanna merge now

---------

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2023-11-21 13:42:35 +00:00
Jonas Platte
71b8e8633d Upgrade dependencies 2023-07-19 10:28:54 +02:00
Jonas Platte
e237405eb1 Bump edition for examples 2023-07-19 10:28:54 +02:00
David Pedersen
69b6f47976
Update axum version in example (#305)
* Update axum version in example

* fix lints
2022-11-29 10:27:52 +00:00
Wolf Thomsen
80946989b5
Use clap 3.x instead of structop for example project CLIs (#261) 2022-05-05 20:43:18 +02:00
Oskar Nehlin
042bcbdff0
Fix ci issue and update axum in example (#206)
* Update axum

* Allow multiple itoa versions
2022-01-14 17:25:59 +01:00
David Pedersen
56ffdb2e73
Make GrpcErrorsAsFailures more flexible (#189)
* Make `GrpcErrorsAsFailures` more flexible

* changelog

* fix imports

* move away from bitmask
2021-11-26 10:53:13 +00:00
David Pedersen
52ed7451cb
Update tracing-subscriber to 0.3 (#186)
Required for https://github.com/tower-rs/tower-http/pull/180
2021-11-23 11:05:54 +01:00
David Pedersen
40607c4dfa
Add axum example (#181)
* Add axum example

* clean up
2021-11-22 09:34:59 +01:00
Jonas Platte
e18fde45f0
Remove unnecessary generic parameter from Set{Request,Response}HeaderLayer (#148) 2021-11-15 13:31:25 +01:00
David Pedersen
efb22018ff
Update tonic and prost in examples (#133) 2021-08-30 20:24:35 +02:00
David Pedersen
cc3a65db55
More easily mark multiple headers as sensitive (#85)
* More easily mark multiple headers as sensitive

* docs fixes

* Try to avoid clones

* Try as ref

* Change to `Arc<Vec<HeaderName>>` and rename things to plural `Headers`

* Docs

* Fix accidental rename

* Change to `Arc<[HeaderName]>`

* Clean up imports

* Fix change on master

* Docs tweaks
2021-05-27 22:42:48 +02:00
David Pedersen
36b8c6236d
Pass the current span to all Trace callbacks (#93)
Allows users to record field values that can't be known when the span is
created.

Fixes https://github.com/tower-rs/tower-http/issues/92

Co-authored-by: Eliza Weisman <eliza@buoyant.io>
2021-05-20 11:35:58 +02:00
David Pedersen
dee4286c2e
Add RequireAuthorization middleware (#70) 2021-05-20 10:14:25 +02:00
Mark Ingram
526368ca31
Avoid backing up in broadcast channel in tonic example (#94) 2021-05-19 17:02:40 +02:00
David Pedersen
b68b39995e
Fix a few bugs related to Trace and gRPC streams (#87) 2021-05-07 16:42:27 +02:00
David Pedersen
2c63532508
Disable compression for gRPC and add tonic streaming example (#82)
* Disable compression for gRPC

* Don't add `accept-encoding` to grpc requests

* Remove debugging code

* Disable formatting of tonic build output

Because it breaks CI

* Apply suggestions from code review

Co-authored-by: Lucio Franco <luciofranco14@gmail.com>

* Address review feedback

Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
2021-04-27 20:48:56 +02:00
David Pedersen
7dd20ce32c
Trace middleware (#77)
* `Trace` middleware

* Make `MakeSpan` generic over the body

That way we can implement it for closures

* Small cleanup

* Implement callback traits for `()`

For doing nothing

* Callback for sending body chunks

* minor clean up

* Add microseconds latency unit and log headers in right place

* Document all the things

* Fix comment

* Include trace layer in tonic example

* Also include tracing middleware on tonic client
2021-04-23 22:38:09 +02:00
David Pedersen
e84cc6f7f8
Tonic example (#72)
* Tonic example

* Add test for tonic example

* Address review feedback

* Use `impl Trait` for returning the service type
2021-03-21 17:43:25 +01:00
David Pedersen
d17c60700b
Fix import (#71) 2021-02-25 23:23:42 +01:00
David Pedersen
d8ff7f611d
Warp example (#69)
* Add warp example

* Add some more middlewares

* Add test for warp example

* Does this work?

* Change example so we avoid complex type

* Replace `Database` type alias with struct

* Update examples/warp-key-value-store/README.md

Co-authored-by: Daiki Mizukami <tesaguriguma@gmail.com>

Co-authored-by: Daiki Mizukami <tesaguriguma@gmail.com>
2021-02-25 22:21:24 +01:00