userver: components::State Class Reference
Loading...
Searching...
No Matches
components::State Class Referencefinal

#include <userver/components/state.hpp>

Detailed Description

State of components that is usable after the components constructor.

See also
components::ComponentContext

Definition at line 21 of file state.hpp.

Public Member Functions

 State (const ComponentContext &cc) noexcept
 
bool IsAnyComponentInFatalState () const
 
bool HasDependencyOn (std::string_view component_name, std::string_view dependency) const
 

Member Function Documentation

◆ 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.

◆ IsAnyComponentInFatalState()

bool components::State::IsAnyComponentInFatalState ( ) const
Returns
true if one of the components is in fatal state and can not work. A component is in fatal state if the components::ComponentHealth::kFatal value is returned from the overridden components::LoggableComponentBase::GetComponentHealth().

The documentation for this class was generated from the following file: