add index_info API so we can query the index about the EOF and
number of bytes written.