aboutsummaryrefslogtreecommitdiffstats
path: root/logforwarder/src/apps/vespa-logforwarder-start/cf-handler.h
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2017-10-02 12:26:28 +0000
committerArne Juul <arnej@yahoo-inc.com>2017-10-05 06:25:32 +0000
commit14b32518dc6b04c791b6aca7adf873d31873de1c (patch)
treee477b1b7ad066f95e8172dc58dbb216117ce9561 /logforwarder/src/apps/vespa-logforwarder-start/cf-handler.h
parentdee4a9914b6928c1712058a162d7d4a133cd57c0 (diff)
add C++ application logforwarder-start
Diffstat (limited to 'logforwarder/src/apps/vespa-logforwarder-start/cf-handler.h')
-rw-r--r--logforwarder/src/apps/vespa-logforwarder-start/cf-handler.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/logforwarder/src/apps/vespa-logforwarder-start/cf-handler.h b/logforwarder/src/apps/vespa-logforwarder-start/cf-handler.h
new file mode 100644
index 00000000000..6ad27d81b0d
--- /dev/null
+++ b/logforwarder/src/apps/vespa-logforwarder-start/cf-handler.h
@@ -0,0 +1,20 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#pragma once
+
+#include <vespa/config/config.h>
+#include "config-logforwarder.h"
+
+using cloud::config::LogforwarderConfig;
+
+class CfHandler {
+private:
+ config::ConfigSubscriber _subscriber;
+ config::ConfigHandle<LogforwarderConfig>::UP _handle;
+ void subscribe(const std::string & configId, uint64_t timeoutMS);
+ void doConfigure();
+public:
+ CfHandler();
+ virtual ~CfHandler();
+ void start(const char *configId);
+ void check();
+};