A Heartbeater.t is an Rpc server only used for heartbeats. The only thing you can do
with a Heartbeater.t is connect to it and get notified when the connection
closed.
A helper function to be used on the ~parent_heartbeater argument of the
init_worker_state function. The suggested use is:
Heartbeater.(if_spawned connect_and_shutdown_on_disconnect_exn) parent_heartbeater
if_spawned f parent_heartbeater will run f on the heartbeater if this worker was
created with spawn. If the worker was created with Connection.serve (in
process), nothing occurs and `No_parent is returned.
Connect to the given Heartbeater.t (host and port) and call
Shutdown.shutdown upon Rpc.Connection.close_finished, raising an exception if
unable to connect. The returned Deferred.t is determined once the initial
connection has been established.