#include <userver/components/state.hpp>
A view of the components' state that is usable after the components are constructed and until all the components are destroyed.
- See also
- components::ComponentContext
Definition at line 110 of file state.hpp.
◆ GetAllDependencies()
| std::unordered_set< std::string_view > components::State::GetAllDependencies |
( |
std::string_view | component_name | ) |
const |
- Returns
- all the components that
component_name depends on directly or transitively.
Component with name component_name should be loaded. Components construction should finish before any call to this function is made. The result should now outlive the all the components destruction.
◆ GetServiceLifetimeStage()
◆ HasDependencyOn()
| bool components::State::HasDependencyOn |
( |
std::string_view | component_name, |
|
|
std::string_view | dependency ) const |
- Returns
- true if component with name
component_name depends (directly or transitively) on a component with name dependency.
Component with name component_name should be loaded. Components construction should finish before any call to this function is made.
Note that GetAllDependencies usually is more effective, if you are planning multiple calls for the same component name.
◆ IsAnyComponentInFatalState()
| bool components::State::IsAnyComponentInFatalState |
( |
| ) |
const |
◆ IsInGracefulShutdown()
| bool components::State::IsInGracefulShutdown |
( |
| ) |
const |
- Returns
- true if the service is being shut down gracefully.
The documentation for this class was generated from the following file: