Copyright | Copyright 2022 Shea Levy. |
---|---|
License | Apache-2.0 |
Maintainer | shea@shealevy.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- newtype ClientM r a = ClientM (ReaderT (EventBackend ClientM r RunRequest) ClientM a)
- runClientM :: EventBackend ClientM r RunRequest -> ClientM r a -> ClientEnv -> IO (Either ClientError a)
- data RunRequest f where
- runRequestJSON :: RenderSelectorJSON RunRequest
- data RunRequestField
- runRequestFieldJSON :: RenderFieldJSON RunRequestField
- clientErrorJSON :: RenderFieldJSON ClientError
- responseJSON :: Response -> Bool -> Value
ClientM
A monad to use in place of ClientM
to get instrumentation on requests.
ClientM (ReaderT (EventBackend ClientM r RunRequest) ClientM a) |
Instances
runClientM :: EventBackend ClientM r RunRequest -> ClientM r a -> ClientEnv -> IO (Either ClientError a) Source #
Instrumented version of runClientM
Instrumentation
data RunRequest f where Source #
Selector for events in ClientM
Instances
MonadReader (EventBackend ClientM r RunRequest) (ClientM r) Source # | |
Defined in Observe.Event.Servant.Client ask :: ClientM r (EventBackend ClientM0 r RunRequest) # local :: (EventBackend ClientM0 r RunRequest -> EventBackend ClientM0 r RunRequest) -> ClientM r a -> ClientM r a # reader :: (EventBackend ClientM0 r RunRequest -> a) -> ClientM r a # |
runRequestJSON :: RenderSelectorJSON RunRequest Source #
Render a RunRequest
and the fields of its selected events as JSON
runRequestFieldJSON :: RenderFieldJSON RunRequestField Source #
Render a RunRequestField
as JSON.
Miscellaneous instrumentation
clientErrorJSON :: RenderFieldJSON ClientError Source #
Render a ClientError
, considered as an Event
field, as JSON