代码拉取完成,页面将自动刷新
package publisher
import (
"github.com/elastic/beats/libbeat/beat"
)
// Batch is used to pass a batch of events to the outputs and asynchronously listening
// for signals from these outpts. After a batch is processed (completed or
// errors), one of the signal methods must be called.
type Batch interface {
Events() []Event
// signals
ACK()
Drop()
Retry()
RetryEvents(events []Event)
Cancelled()
CancelledEvents(events []Event)
}
// Event is used by the publisher pipeline and broker to pass additional
// meta-data to the consumers/outputs.
type Event struct {
Content beat.Event
Flags EventFlags
}
// EventFlags provides additional flags/option types for used with the outputs.
type EventFlags uint8
const (
// GuaranteedSend requires an output to not drop the event on failure, but
// retry until ACK.
GuaranteedSend EventFlags = 0x01
)
// Guaranteed checks if the event must not be dropped by the output or the
// publisher pipeline.
func (e *Event) Guaranteed() bool {
return (e.Flags & GuaranteedSend) == GuaranteedSend
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。