本文整理汇总了Golang中github.com/skydive-project/skydive/flow.Flow类的典型用法代码示例。如果您正苦于以下问题:Golang Flow类的具体用法?Golang Flow怎么用?Golang Flow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Flow类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: SendFlow
func (c *Client) SendFlow(f *flow.Flow) error {
data, err := f.GetData()
if err != nil {
return err
}
c.connection.Write(data)
return nil
}
示例2: Enhance
func (gfe *OvsFlowEnhancer) Enhance(f *flow.Flow) {
if f.ANodeUUID == "" || f.BNodeUUID == "" {
if f.Link == nil {
return
}
}
if f.ANodeUUID == "" {
f.ANodeUUID = gfe.getNodeUUID(f.Link.A)
}
if f.BNodeUUID == "" {
f.BNodeUUID = gfe.getNodeUUID(f.Link.B)
}
}
示例3: SendFlow
func (c *Client) SendFlow(f *flow.Flow) error {
data, err := f.GetData()
if err != nil {
return err
}
retry:
_, err = c.connection.Write(data)
if err != nil {
logging.GetLogger().Errorf("flows connection to analyzer error %s : try to reconnect" + err.Error())
c.connection.Close()
c.connect()
goto retry
}
return nil
}
示例4: SetProbeNode
func (p *OvsSFlowProbe) SetProbeNode(flow *flow.Flow) bool {
flow.NodeUUID = p.NodeUUID
return true
}
示例5: SetProbeNode
func (p *GoPacketProbe) SetProbeNode(flow *flow.Flow) bool {
flow.NodeUUID = p.NodeUUID
return true
}