Hive.Pubsub.Local
hive · API reference
In-process transport used by local.
This module is public mostly for tests and examples that want to exercise the functor explicitly. Most applications can call local directly.
type tLocal callback table.
val create : unit -> tCreate an empty local transport.
val publish : t -> topic:string -> payload:string -> unitPublish an opaque payload to topic.
val subscribe : t -> topic:string -> (payload:string -> unit) -> unsubscribeSubscribe a callback to topic.
The returned function releases just this subscription. It should be safe to call more than once.