neptune-backend-0.3.0: Neptune Client
Copyright(c) Jiasen Wu 2020
LicenseBSD-3-Clause
Safe HaskellNone
LanguageHaskell2010

Neptune.Channel

Description

 
Synopsis

Documentation

transmitter :: HasCallStack => NeptuneSession -> Experiment -> IO () Source #

Background thread for transmission

createChannel :: forall t. (NeptDataType t, HasCallStack) => NeptuneSession -> ExperimentId -> Text -> IO (DataChannel t) Source #

Create a neptune data channel.

getOrCreateChannel Source #

Arguments

:: forall t. NeptDataType t 
=> Proxy t

dummy data type

-> ChannelHashMap

current user channels

-> Text

channel name

-> IO (DataChannel t)

creator

-> IO DataChannelAny 

Get a neptune data channel. If the data channel doesn't exist yet, a data channel will be created and added to the hashmap of current user channels.

sendChannel :: HasCallStack => NeptuneSession -> ExperimentId -> [DataChannelWithData] -> IO () Source #

Send a batch of data in their respective channel.

readTChanAtMost :: Int -> TChan a -> STM [a] Source #

Read at most n items from the queue, with blocking read at the first item.

readTChanFull :: TChan a -> STM [a] Source #

Read all items from the queue

gatherDataPoints :: forall a. NeptDataType a => Proxy a -> [DataPointAny] -> ([Text], [DataPoint a]) Source #