1 Star 0 Fork 1

SmartSmallBoy/loongcollector_cpp

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
InputPrometheus.h 877 Bytes
Copy Edit Raw Blame History
#pragma once
#include <cstdint>
#include <memory>
#include <string>
#include "collection_pipeline/plugin/interface/Input.h"
#include "prometheus/schedulers/TargetSubscriberScheduler.h"
namespace logtail {
class InputPrometheus : public Input {
public:
static const std::string sName;
const std::string& Name() const override { return sName; }
bool Init(const Json::Value& config, Json::Value& optionalGoPipeline) override;
bool Start() override;
bool Stop(bool isPipelineRemoving) override;
bool SupportAck() const override { return true; }
private:
bool CreateInnerProcessors(const Json::Value& inputConfig);
// only one job is supported
std::shared_ptr<TargetSubscriberScheduler> mTargetSubscirber;
std::string mJobName;
#ifdef APSARA_UNIT_TEST_MAIN
friend class InputPrometheusUnittest;
#endif
};
} // namespace logtail
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/SmartSmallBoy/loongcollector_cpp.git
git@gitee.com:SmartSmallBoy/loongcollector_cpp.git
SmartSmallBoy
loongcollector_cpp
loongcollector_cpp
master

Search