Exemple #1
0
func (v *DupAgent) Flow(source core.Agent) (err error) {
	v.sources = append(v.sources, source)

	if v.msh != nil {
		m := v.msh.Copy().SetTimestamp(v.lastTimestamp)
		if err = source.Write(m); err != nil {
			return
		}
	}

	if v.vsh != nil {
		m := v.vsh.Copy().SetTimestamp(v.lastTimestamp)
		if err = source.Write(m); err != nil {
			return
		}
	}

	if v.ash != nil {
		m := v.ash.Copy().SetTimestamp(v.lastTimestamp)
		if err = source.Write(m); err != nil {
			return
		}
	}

	return
}