Ingest metadata query implementation

Ingest metadata query - 
expose maxIngestedEventTime
This looks like c/p from the TimeBoundary tool chest, is it possible to share the code?