discover: add handler reference to struct discover_context