userver: components/component_sample_test.hpp
Loading...
Searching...
No Matches
components/component_sample_test.hpp
#pragma once
namespace myservice::smth {
class Component final : public components::ComponentBase {
public:
// name of your component to refer in static config
static constexpr std::string_view kName = "smth";
Component(const components::ComponentConfig& config, const components::ComponentContext& context);
int DoSomething() const;
~Component() final;
static yaml_config::Schema GetStaticConfigSchema();
private:
};
} // namespace myservice::smth
template <>
inline constexpr bool components::kHasValidate<myservice::smth::Component> = true;
template <>
inline constexpr auto components::kConfigFileMode<myservice::smth::Component> = ConfigFileMode::kNotRequired;