如何开发原生Flusher插件
接口定义
class Flusher : public Plugin {
public:
virtual bool Init(const Json::Value& config, Json::Value& optionalGoPipeline) = 0;
virtual bool Start();
virtual bool Stop(bool isPipelineRemoving);
virtual bool Send(PipelineEventGroup&& g) = 0;
virtual bool Flush(size_t key) = 0;
virtual bool FlushAll() = 0;
// ...
};class HttpFlusher : public Flusher {
public:
virtual bool BuildRequest(SenderQueueItem* item, std::unique_ptr<HttpSinkRequest>& req,
bool* keepItem, std::string* errMsg) = 0;
virtual void OnSendDone(const HttpResponse& response, SenderQueueItem* item) = 0;
};Flusher 级组件
聚合(必选)
名称
类型
默认值
说明
序列化(必选)
压缩(可选)
开发步骤(以 HttpFlusher 为例)
Last updated