Documentation
¶
Index ¶
- Variables
- type Node
- func (n *Node) AddOutput(node *Node)
- func (n *Node) AddTaskNode(nextNode *Node, taskNode *TaskNode)
- func (n *Node) RemoveOutput(node *Node)
- func (n *Node) RemoveTaskNode(nextNode *Node, taskNode *TaskNode)
- func (n *Node) Run()
- func (n *Node) SetInput(input chan interface{})
- func (n *Node) String() string
- func (n *Node) WaitUntilGameOver()
- type NodeI
- type TaskNode
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CrawlerSendTotal = bkmonitoring.NewInt("crawler_send_total") // 兼容指标,之前有使用这个作为发送的数量 CrawlerReceived = bkmonitoring.NewInt("crawler_received") // 兼容指标,接收到的所有事件数 CrawlerState = bkmonitoring.NewInt("crawler_state") // 兼容指标,接收到的所有事件中状态事件数量 CrawlerDropped = bkmonitoring.NewInt("crawler_dropped") // 兼容指标,丢弃数量 CrawlerPackageSendTotal = bkmonitoring.NewInt("crawler_package_send_total") // 打包发送的数量 )
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct { ID string ParentNode *Node Outs map[string]chan interface{} In chan interface{} CloseOnce sync.Once End chan struct{} GameOver chan struct{} // 用该信号代表Run函数已经完整退出 TaskNodeList map[string]map[string]*TaskNode }
func NewEmptyNode ¶
func (*Node) AddTaskNode ¶
func (*Node) RemoveOutput ¶
func (*Node) RemoveTaskNode ¶
func (*Node) WaitUntilGameOver ¶
func (n *Node) WaitUntilGameOver()
type TaskNode ¶
type TaskNode struct { *Node CrawlerReceived *monitoring.Int //state事件 CrawlerState *monitoring.Int //state事件 CrawlerSendTotal *monitoring.Int //正常事件总数 CrawlerDropped *monitoring.Int //过滤掉的事件总数 SenderReceive *monitoring.Int // 接收的事件数 SenderSendTotal *monitoring.Int // 发送到pipeline的数量 SenderState *monitoring.Int // 仅需要更新采集状态的事件数(event.Field为空) }
Click to show internal directories.
Click to hide internal directories.