cardano-rpc
Safe HaskellNone
LanguageHaskell2010

Cardano.Rpc.Server.Internal.Monad

Synopsis

Documentation

class Has field env where Source #

Provides a value of type field from the value env Used in conjunction with 'MonadReader env m' allows to easily access fields from the environment.

Methods

obtain :: env -> field Source #

Instances

Instances details
Has LocalNodeConnectInfo RpcEnv Source # 
Instance details

Defined in Cardano.Rpc.Server.Internal.Monad

Has a a Source # 
Instance details

Defined in Cardano.Rpc.Server.Internal.Monad

Methods

obtain :: a -> a Source #

MonadIO m => Has (Tracer m TraceRpc) RpcEnv Source # 
Instance details

Defined in Cardano.Rpc.Server.Internal.Monad

Methods

obtain :: RpcEnv -> Tracer m TraceRpc Source #

grab :: (Has field env, MonadReader env m) => m field Source #

Obtain the field from the environment

putTrace Source #

Arguments

:: forall t' t e m. (t ~ TraceRpc, Inject t' t, Has (Tracer m t) e, MonadReader e m) 
=> t'

the traced value

-> m () 

Using tracer from the environment, print the trace

wrapInSpan Source #

Arguments

:: forall t' t e m a. (t ~ TraceRpc, Inject t' t, NFData a, Has (Tracer m t) e, MonadReader e m, MonadUnliftIO m) 
=> (TraceSpanEvent -> t')

Trace constructor accepting TraceSpanEvent

-> m a

action to be wrapped in begin and end events

-> m a 

Wrap the action in span begin and end events