// Start the adaptor as a source
Start the adaptor as a source
// Start the adaptor as a source
func (m *Mongodb) Start() (err error) {
	defer func() {
		m.pipe.Stop()
	}()
	m.oplogTime = nowAsMongoTimestamp()
	if m.debug {
		fmt.Printf("setting start timestamp: %d\n", m.oplogTime)
	}
	err = m.catData()
	if err != nil {
		m.pipe.Err <- err
		return err
	}
	if m.tail {
		err = m.tailData()
		if err != nil {
			m.pipe.Err <- err
			return err
		}
	}
	return
}
func ( m * Mongodb ) Start ( ) ( err error ) { defer func ( ) { m . pipe . Stop ( ) } ( ) m . oplogTime = nowAsMongoTimestamp ( ) if m . debug { fmt . Printf ( " \n " , m . oplogTime ) } err = m . catData ( ) if err != nil { m . pipe . Err <- err return err } if m . tail { err = m . tailData ( ) if err != nil { m . pipe . Err <- err return err } } return }
Start the adaptor as a source
Start the adaptor as a source
// replay the oplog