One-controller lease for mutating inspector operations. More...
#include <session.hpp>
Classes | |
| struct | EndedScope |
Public Types | |
| using | Clock = std::function<std::chrono::steady_clock::time_point()> |
Public Member Functions | |
| InspectorControllerLease (std::chrono::milliseconds ttl=std::chrono::seconds(15), Clock clock=[] { return std::chrono::steady_clock::now();}) | |
| ControllerLeaseResult | acquire (std::string_view owner) |
| ControllerLeaseResult | renew (std::string_view owner) |
| bool | release (std::string_view owner) |
| void | disconnect (std::string_view owner) |
| bool | owns (std::string_view owner) |
| std::optional< std::string > | owner () |
| std::chrono::milliseconds | remaining () |
Friends | |
| class | InspectorSession |
One-controller lease for mutating inspector operations.
The injected clock keeps expiry deterministic in tests and avoids wall-clock jumps.
| using pulp::inspect::InspectorControllerLease::Clock = std::function<std::chrono::steady_clock::time_point()> |
|
explicit |
| ControllerLeaseResult pulp::inspect::InspectorControllerLease::acquire | ( | std::string_view | owner | ) |
| void pulp::inspect::InspectorControllerLease::disconnect | ( | std::string_view | owner | ) |
| std::optional< std::string > pulp::inspect::InspectorControllerLease::owner | ( | ) |
| bool pulp::inspect::InspectorControllerLease::owns | ( | std::string_view | owner | ) |
| bool pulp::inspect::InspectorControllerLease::release | ( | std::string_view | owner | ) |
| std::chrono::milliseconds pulp::inspect::InspectorControllerLease::remaining | ( | ) |
| ControllerLeaseResult pulp::inspect::InspectorControllerLease::renew | ( | std::string_view | owner | ) |
|
friend |