本文整理匯總了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
}