Source

core hello world / broker_server.ml

Diff from to

broker_server.ml

   Ivar.fill_if_empty stop ();
   return ()
 
+let clear_impl (dir,_) topic =
+  Log.Global.info "Clearing topic %s" (Topic.to_string topic);
+  Directory.clear_topic dir topic;
+  return ()
+
 (* We then create a list of all the implementations we're going to support in
    the server. *)
 
   ; Rpc.Pipe_rpc.implement subscribe_rpc subscribe_impl
   ; Rpc.Rpc.     implement dump_rpc      dump_impl
   ; Rpc.Rpc.     implement shutdown_rpc  shutdown_impl
+  ; Rpc.Rpc.     implement clear_rpc     clear_impl
   ]
 
 (* Finally we create a command for starting the broker server *)