1 Star 0 Fork 0

zhangjungang/beats

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
server.go 738 Bytes
一键复制 编辑 原始数据 按行查看 历史
package server
import "github.com/elastic/beats/libbeat/common"
type Meta common.MapStr
const (
EventDataKey = "data"
)
// Server is an interface that can be used to implement servers which can accept data.
type Server interface {
// Start is used to start the server at a well defined port.
Start() error
// Stop the server.
Stop()
// Get a channel of events.
GetEvents() chan Event
}
// Event is an interface that can be used to get the event and event source related information.
type Event interface {
// Get the raw bytes of the event.
GetEvent() common.MapStr
// Get any metadata associated with the data that was received. Ex: client IP for udp message,
// request/response headers for HTTP call.
GetMeta() Meta
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangjungang/beats.git
git@gitee.com:zhangjungang/beats.git
zhangjungang
beats
beats
v6.2.3

搜索帮助