trace-forward-2.2.2: The forwarding protocols library for cardano node.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Trace.Forward.Utils.DataPoint

Synopsis

Documentation

data DataPoint where Source #

Type wrapper for some value of type v. The only reason we need this wrapper is an ability to store different values in the same DataPointStore.

Please note that when the acceptor application will read the value of type v from the store, this value is just as unstructured JSON, but not Haskell value of type v. That's why FromJSON instance for type v should be available for the acceptor application, to decode unstructured JSON.

Constructors

DataPoint :: (ToJSON v, NFData v) => v -> DataPoint 

data DataPointRequestor Source #

Since DataPointForward protocol does not assume the stream of requests/replies, we use the TVars to provide to acceptor's side an ability to ask DataPoints explicitly.

Constructors

DataPointRequestor 

Fields

readFromStore :: DataPointStore -> DataPointForwarder IO () Source #

Read DataPoints from the store. Please note that we don't care what's inside of DataPoint, we just know it can be encoded to JSON.