func (c *Client) SendFlow(f *flow.Flow) error { data, err := f.GetData() if err != nil { return err } c.connection.Write(data) return nil }
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) } }
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 }
func (p *OvsSFlowProbe) SetProbeNode(flow *flow.Flow) bool { flow.NodeUUID = p.NodeUUID return true }
func (p *GoPacketProbe) SetProbeNode(flow *flow.Flow) bool { flow.NodeUUID = p.NodeUUID return true }