Skip to main content

Crate tower_fallback

Crate tower_fallback 

Source
Expand description

A service combinator that sends requests to a first service, then retries processing on a second fallback service if the first service errors, or if a custom fallback policy selects the fallback service.

Fallback designs have a number of downsides but may be useful in some cases. For instance, when using batch verification, the Fallback wrapper can be used to fall back to individual verification of each item when a batch fails to verify.

TODO: compare with similar code in linkerd.

Modules§

future
Future types for the Fallback middleware.

Structs§

Fallback
Provides fallback processing on a second service if its fallback policy selects it.
OnError
The default fallback policy.

Traits§

FallbackPolicy
Decides if a Fallback service should call its fallback service.

Type Aliases§

BoxedError
A boxed type-erased std::error::Error that can be sent between threads.