Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Helpers used to call octez-client
.
Synopsis
- data CallMode
- callTezosClient :: forall env m. (WithClientLog env m, HasTezosClientEnv env, MonadIO m, MonadCatch m) => (Text -> Text -> IO Bool) -> [String] -> CallMode -> Maybe ScrubbedBytes -> m Text
- callTezosClientStrict :: (WithClientLog env m, HasTezosClientEnv env, MonadIO m, MonadCatch m) => [String] -> CallMode -> Maybe ScrubbedBytes -> m Text
- readProcessWithExitCode' :: FilePath -> [String] -> String -> IO (ExitCode, String, String)
Documentation
Datatype that represents modes for calling node from octez-client
.
MockupMode | Mode in which |
ClientMode | Normal mode in which |
callTezosClient :: forall env m. (WithClientLog env m, HasTezosClientEnv env, MonadIO m, MonadCatch m) => (Text -> Text -> IO Bool) -> [String] -> CallMode -> Maybe ScrubbedBytes -> m Text Source #
Call octez-client
with given arguments. Arguments defined by
config are added automatically. The second argument specifies what
should be done in failure case. It takes stdout and stderr
output. Possible handling:
- Parse a specific error and throw it.
- Parse an expected error that shouldn't cause a failure.
Return
True
in this case. - Detect an unexpected error, return
False
. In this caseUnexpectedClientFailure
will be throw.
callTezosClientStrict :: (WithClientLog env m, HasTezosClientEnv env, MonadIO m, MonadCatch m) => [String] -> CallMode -> Maybe ScrubbedBytes -> m Text Source #
Call octez-client
and expect success.