module documentation
Asynchronous renewable file-backed bearer.
This module provides an asynchronous variant of the renewable file-backed
bearer which uses a ThrottledTokenCache and runs a background
refresh task. The implementation exposes two primary classes:
AsynchronousRenewableFileCacheReceiver-- An asynchronous receiver that uses a fresh cached token. If necessary, it requests a renewal from the wrapped bearer. It uses a limited retry strategy.AsynchronousRenewableFileCacheBearer-- A bearer that wraps an existing bearer. Its background refresh loop saves tokens to a file cache.
Example
Create an asynchronous renewable bearer from a named network bearer:
async_bearer = AsynchronousRenewableFileCacheBearer(network_bearer) token = await async_bearer.receiver().fetch()
| Class | |
Asynchronous bearer that refreshes tokens into a file-backed cache. |
| Class | |
Receiver that requests asynchronous renewals when needed. |
| Constant | VERY |
A very long timeout used when a token has no expiration. |
| Type Variable | T |
Undocumented |
| Variable | log |
Undocumented |
A very long timeout used when a token has no expiration.
This constant is used as an effectively infinite timeout value when calculating retry intervals for tokens that carry no expiration time.
| Value |
|