Crate sentinel_rocket

source ·
Expand description

This crate provides the sentinel middleware for actix-web. See examples for help.

Structs

When using SentinelGuard, we can only use managed state to configure the SentinelGuard. That is
The Rocket Fairing. The SentinelConfig in SentinelFairing is with higher priority than the one in global managed state.
The managed state to be processed in the handler mounted in SentinelFairing.
The Rocket request guard, which is the recommended way in Rocket documentation. To use this guard, simply add it to the arguments of handler. By default, it extracts the path in the Request::uri() as the sentinel resource name. The blocked requests returns the status 429,

Type Definitions

It is used to extractor a resource name from requests for Sentinel. If you the service request is http::Request, and you are using nightly toolchain, you don’t need to provide a sentinel resource name extractor. The middleware will automatically extract the request uri.
The fallback function when service is rejected by sentinel.