Crate sentinel_rocket

Source
Expand description

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

Structs§

SentinelConfig
When using SentinelGuard, we can only use managed state to configure the SentinelGuard. That is
SentinelFairing
The Rocket Fairing. The SentinelConfig in SentinelFairing is with higher priority than the one in global managed state.
SentinelFairingHandler
SentinelFairingState
The managed state to be processed in the handler mounted in SentinelFairing.
SentinelGuard
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 Aliases§

BoxError
Extractor
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.
Fallback
The fallback function when service is rejected by sentinel.
SentinelConfigForFairing
SentinelConfigForGuard