mirror of https://github.com/voidlizard/hbs2
fixed-messaging-and-basic-probes
This commit is contained in:
parent
0103dc3820
commit
eaff46c757
|
@ -0,0 +1,24 @@
|
|||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
module RPC2.Probes where
|
||||
|
||||
import HBS2.Prelude.Plated
|
||||
import HBS2.Net.Proto.Service
|
||||
|
||||
import HBS2.System.Logger.Simple
|
||||
|
||||
import HBS2.Peer.RPC.API.Peer
|
||||
import HBS2.Peer.RPC.Internal.Types
|
||||
|
||||
import UnliftIO
|
||||
|
||||
instance (MonadIO m, HasRpcContext PeerAPI RPC2Context m) => HandleMethod m RpcGetProbes where
|
||||
|
||||
handleMethod _ = do
|
||||
probes <- getRpcContext @PeerAPI
|
||||
<&> rpcProbes
|
||||
>>= readTVarIO
|
||||
|
||||
debug $ "rpc.getProbes"
|
||||
probeSnapshot probes
|
||||
|
Loading…
Reference in New Issue