module Network.Ipfs.Api.Dht where
import Control.Monad.IO.Class (MonadIO)
import Data.Text (Text)
import Network.Ipfs.Api.Internal.Call (streamCall)
import Network.Ipfs.Api.Internal.Stream (_dhtFindPeer, _dhtFindProvs,
_dhtGet, _dhtProvide,
_dhtQuery)
findPeer :: MonadIO m => Text -> m ()
findPeer :: Text -> m ()
findPeer = ClientM (SourceT IO DhtObj) -> m ()
forall (m :: * -> *) a.
(MonadIO m, Show a) =>
ClientM (SourceT IO a) -> m ()
streamCall (ClientM (SourceT IO DhtObj) -> m ())
-> (Text -> ClientM (SourceT IO DhtObj)) -> Text -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> ClientM (SourceT IO DhtObj)
_dhtFindPeer
findProvs :: MonadIO m => Text -> m ()
findProvs :: Text -> m ()
findProvs = ClientM (SourceT IO DhtObj) -> m ()
forall (m :: * -> *) a.
(MonadIO m, Show a) =>
ClientM (SourceT IO a) -> m ()
streamCall (ClientM (SourceT IO DhtObj) -> m ())
-> (Text -> ClientM (SourceT IO DhtObj)) -> Text -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> ClientM (SourceT IO DhtObj)
_dhtFindProvs
get :: MonadIO m => Text -> m ()
get :: Text -> m ()
get Text
cid = ClientM (SourceT IO DhtObj) -> m ()
forall (m :: * -> *) a.
(MonadIO m, Show a) =>
ClientM (SourceT IO a) -> m ()
streamCall (ClientM (SourceT IO DhtObj) -> m ())
-> ClientM (SourceT IO DhtObj) -> m ()
forall a b. (a -> b) -> a -> b
$ Text -> ClientM (SourceT IO DhtObj)
_dhtGet Text
cid
provide :: MonadIO m => Text -> m ()
provide :: Text -> m ()
provide = ClientM (SourceT IO DhtObj) -> m ()
forall (m :: * -> *) a.
(MonadIO m, Show a) =>
ClientM (SourceT IO a) -> m ()
streamCall (ClientM (SourceT IO DhtObj) -> m ())
-> (Text -> ClientM (SourceT IO DhtObj)) -> Text -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> ClientM (SourceT IO DhtObj)
_dhtProvide
query :: MonadIO m => Text -> m ()
query :: Text -> m ()
query = ClientM (SourceT IO DhtObj) -> m ()
forall (m :: * -> *) a.
(MonadIO m, Show a) =>
ClientM (SourceT IO a) -> m ()
streamCall (ClientM (SourceT IO DhtObj) -> m ())
-> (Text -> ClientM (SourceT IO DhtObj)) -> Text -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> ClientM (SourceT IO DhtObj)
_dhtQuery