LCOV - code coverage report
Current view: top level - source/common/config - watched_directory.h (source / functions) Hit Total Coverage
Test: coverage.dat Lines: 0 1 0.0 %
Date: 2024-01-05 06:35:25 Functions: 0 1 0.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "envoy/config/core/v3/base.pb.h"
       4             : #include "envoy/event/dispatcher.h"
       5             : #include "envoy/filesystem/watcher.h"
       6             : 
       7             : namespace Envoy {
       8             : namespace Config {
       9             : 
      10             : // Implement the common functionality of envoy::config::core::v3::WatchedDirectory.
      11             : class WatchedDirectory {
      12             : public:
      13             :   using Callback = std::function<void()>;
      14             : 
      15             :   WatchedDirectory(const envoy::config::core::v3::WatchedDirectory& config,
      16             :                    Event::Dispatcher& dispatcher);
      17             : 
      18           0 :   void setCallback(Callback cb) { cb_ = cb; }
      19             : 
      20             : private:
      21             :   std::unique_ptr<Filesystem::Watcher> watcher_;
      22             :   Callback cb_;
      23             : };
      24             : 
      25             : using WatchedDirectoryPtr = std::unique_ptr<WatchedDirectory>;
      26             : 
      27             : } // namespace Config
      28             : } // namespace Envoy

Generated by: LCOV version 1.15