func (m *Monitor) handleNetworkEvent(msg events.Message) error {
	probeEventType := model.UnknownEventType
	switch msg.Action {
	case "connect":
		probeEventType = model.ContainerConnectEventType
	case "disconnect":
		probeEventType = model.ContainerDisconnectEventType
	}
	cdata, err := m.createContainerEventFromContainerID(msg.Actor.Attributes["container"])
	if err != nil {
		return err
	}
	cdata.EventType = probeEventType
	cdata.Timestamp = time.Unix(0, msg.TimeNano)
	return m.filterAndDispatchEvent(cdata)
}
// handleNetworkEvent - handle a network event
handle a network event
// handleNetworkEvent - handle a network event
func (m *Monitor) handleNetworkEvent(msg events.Message) error {
	probeEventType := model.UnknownEventType
	switch msg.Action {
	case "connect":
		probeEventType = model.ContainerConnectEventType
	case "disconnect":
		probeEventType = model.ContainerDisconnectEventType
	}
	cdata, err := m.createContainerEventFromContainerID(msg.Actor.Attributes["container"])
	if err != nil {
		return err
	}
	cdata.EventType = probeEventType
	cdata.Timestamp = time.Unix(0, msg.TimeNano)
	return m.filterAndDispatchEvent(cdata)
}
func ( m * Monitor ) handleNetworkEvent ( msg events . Message ) error { probeEventType := model . UnknownEventType switch msg . Action { case " " : probeEventType = model . ContainerConnectEventType case " " : probeEventType = model . ContainerDisconnectEventType } cdata , err := m . createContainerEventFromContainerID ( msg . Actor . Attributes [ " " ] ) if err != nil { return err } cdata . EventType = probeEventType cdata . Timestamp = time . Unix ( 0 , msg . TimeNano ) return m . filterAndDispatchEvent ( cdata ) }
handle a network event
handle a network event