lwwref cli skeleton

This commit is contained in:
Dmitry Zuikov 2024-03-12 11:15:58 +03:00
parent aa2688c0a3
commit f96621b612
3 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,24 @@
module CLI.LWWRef where
import HBS2.Prelude.Plated
import HBS2.Peer.Proto.LWWRef
import CLI.Common
import RPC2()
import PeerLogger hiding (info)
import Options.Applicative
pLwwRef :: Parser (IO ())
pLwwRef = hsubparser ( command "fetch" (info pLwwRefFetch (progDesc "fetch lwwref"))
<> command "get" (info pLwwRefGet (progDesc "get lwwref"))
)
pLwwRefFetch :: Parser (IO ())
pLwwRefFetch = pure do
pure ()
pLwwRefGet :: Parser (IO ())
pLwwRefGet = pure do
pure ()

View File

@ -53,6 +53,7 @@ import DispatchProxy
import PeerMeta import PeerMeta
import CLI.Common import CLI.Common
import CLI.RefChan import CLI.RefChan
import CLI.LWWRef
import RefChan import RefChan
import RefChanNotifyLog import RefChanNotifyLog
import Fetch (fetchHash) import Fetch (fetchHash)
@ -236,6 +237,7 @@ runCLI = do
<> command "fetch" (info pFetch (progDesc "fetch block")) <> command "fetch" (info pFetch (progDesc "fetch block"))
<> command "reflog" (info pRefLog (progDesc "reflog commands")) <> command "reflog" (info pRefLog (progDesc "reflog commands"))
<> command "refchan" (info pRefChan (progDesc "refchan commands")) <> command "refchan" (info pRefChan (progDesc "refchan commands"))
<> command "lwwref" (info pLwwRef (progDesc "lwwref commands"))
<> command "peers" (info pPeers (progDesc "show known peers")) <> command "peers" (info pPeers (progDesc "show known peers"))
<> command "pexinfo" (info pPexInfo (progDesc "show pex")) <> command "pexinfo" (info pPexInfo (progDesc "show pex"))
<> command "download" (info pDownload (progDesc "download management")) <> command "download" (info pDownload (progDesc "download management"))
@ -453,7 +455,6 @@ runCLI = do
<> command "del" (info pPollDel (progDesc "del poller" )) <> command "del" (info pPollDel (progDesc "del poller" ))
) )
pPollAdd = do pPollAdd = do
rpc <- pRpcCommon rpc <- pRpcCommon
r <- argument refP (metavar "REF") r <- argument refP (metavar "REF")

View File

@ -269,6 +269,7 @@ executable hbs2-peer
, DispatchProxy , DispatchProxy
, CLI.Common , CLI.Common
, CLI.RefChan , CLI.RefChan
, CLI.LWWRef
, Paths_hbs2_peer , Paths_hbs2_peer