| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cardano.Logging.Tracer.DataPoint
Synopsis
- data DataPoint where
- type DataPointName = Text
- type DataPointStore = TVar (Map DataPointName DataPoint)
- initDataPointStore :: IO DataPointStore
- writeToStore :: DataPointStore -> DataPointName -> DataPoint -> IO ()
- dataPointTracer :: forall m. MonadIO m => DataPointStore -> Trace m DataPoint
- mkDataPointTracer :: forall dp. (ToJSON dp, MetaTrace dp, NFData dp) => Trace IO DataPoint -> IO (Trace IO dp)
Documentation
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.
type DataPointName = Text Source #
type DataPointStore = TVar (Map DataPointName DataPoint) Source #
writeToStore :: DataPointStore -> DataPointName -> DataPoint -> IO () Source #
Write DataPoint to the store.
dataPointTracer :: forall m. MonadIO m => DataPointStore -> Trace m DataPoint Source #