veyron/runtimes/google/rt: Replace http debug server with exported stats.
This change adds exported function objects. When the value of the object is
requested, the user-supplied function is called and the value that it returns
becomes the value of the object.
This kind of pattern is dangerous because users could potentially block the
stats interface indefinitely. For the purpose that I have in mind (also
in the change), I don't see any good alternatives. To mitigate the risk,
if the user's function doesn't return within 100 ms, the previous value is used
instead.
Purpose: export the stream manager debug information. The format is
the same as what's on the http debug page and is suitable only for human
readers. This allows us to get rid of the http server.
We can explore better ways to export stream manager data later on.
Change-Id: I386252e5dbfc9c1a8c8b74291e359b463343c8bb
7 files changed