1 Star 0 Fork 0

sqos/beats

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
outputs.go 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
Nicolas Ruflin 提交于 2017-10-03 14:33 . Run make misspell (#5300)
// Package outputs defines common types and interfaces to be implemented by
// output plugins.
package outputs
import (
"github.com/elastic/beats/libbeat/publisher"
)
// Client provides the minimal interface an output must implement to be usable
// with the publisher pipeline.
type Client interface {
Close() error
// Publish sends events to the clients sink. A client must synchronously or
// asynchronously ACK the given batch, once all events have been processed.
// Using Retry/Cancelled a client can return a batch of unprocessed events to
// the publisher pipeline. The publisher pipeline (if configured by the output
// factory) will take care of retrying/dropping events.
Publish(publisher.Batch) error
}
// NetworkClient defines the required client capabilities for network based
// outputs, that must be reconnectable.
type NetworkClient interface {
Client
Connectable
}
// Connectable is optionally implemented by clients that might be able to close
// and reconnect dynamically.
type Connectable interface {
// Connect establishes a connection to the clients sink.
// The connection attempt shall report an error if no connection could been
// established within the given time interval. A timeout value of 0 == wait
// forever.
Connect() error
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sqos/beats.git
git@gitee.com:sqos/beats.git
sqos
beats
beats
v6.1.4

搜索帮助