pub async fn serve<P: EnabledPredicate>(
cache: Arc<SpanCache<P>>,
level_handle: LevelHandle,
chance_handle: ChanceHandle,
addr: SocketAddr,
) -> Result<(), ServeError>Expand description
Bind to addr and serve the console RPC protocol against cache.
level_handle is the LevelHandle returned by the cache’s
LevelPredicate; the server uses it to apply SetCacheLevel
requests and to broadcast the resulting level to every connected
stream. Caller is responsible for spawning the cache’s Driver
and for keeping level_handle consistent with what the cache
actually uses. The future runs until the listener errors out.