| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Rpc.Server
Contents
Synopsis
- runRpcServer :: Tracer IO TraceRpc -> RpcConfig -> NetworkMagic -> IORef (Maybe NodeKernelAccess) -> IO ()
- data NodeKernelAccess
- mkNodeKernelAccess :: Monad m => Tracer m Text -> BlockType blk -> TopLevelConfig blk -> NodeKernel IO addrNTN addrNTC blk -> m (Maybe NodeKernelAccess)
- data TraceRpc
- data TraceRpcSubmit
- data TraceRpcQuery
- data TraceRpcSync
- data TraceSpanEvent
Documentation
Arguments
| :: Tracer IO TraceRpc | Tracer for RPC lifecycle and error events |
| -> RpcConfig | Server configuration |
| -> NetworkMagic | Network discriminant |
| -> IORef (Maybe NodeKernelAccess) | Node kernel access, populated when the kernel is ready |
| -> IO () |
Start the gRPC server, registering all RPC service handlers. Does nothing when the RPC server is disabled in configuration.
data NodeKernelAccess Source #
In-process access to the node kernel. Constructed by cardano-node once consensus initialisation completes.
Instances
| Has (IORef (Maybe NodeKernelAccess)) RpcEnv Source # | |
Defined in Cardano.Rpc.Server.Internal.Monad | |
Arguments
| :: Monad m | |
| => Tracer m Text | Tracer for unsupported block type warnings |
| -> BlockType blk | Block type witness |
| -> TopLevelConfig blk | Top-level consensus config (for system start and era history) |
| -> NodeKernel IO addrNTN addrNTC blk | Consensus node kernel |
| -> m (Maybe NodeKernelAccess) |
Construct NodeKernelAccess from a consensus NodeKernel.
Returns Nothing and traces the block type for non-Cardano block types.
Traces
A sum type representing all possible traces
Constructors
| TraceRpcQuery TraceRpcQuery | |
| TraceRpcSubmit TraceRpcSubmit | |
| TraceRpcSync TraceRpcSync | |
| TraceRpcError SomeException | |
| TraceRpcFatalError SomeException |
Instances
| Pretty TraceRpc Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing | |
| Inject TraceRpcQuery TraceRpc Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing Methods inject :: TraceRpcQuery -> TraceRpc Source # | |
| Inject TraceRpcSubmit TraceRpc Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing Methods inject :: TraceRpcSubmit -> TraceRpc Source # | |
| Inject TraceRpcSync TraceRpc Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing Methods inject :: TraceRpcSync -> TraceRpc Source # | |
| MonadIO m => Has (Tracer m TraceRpc) RpcEnv Source # | |
data TraceRpcSubmit Source #
Traces used in SubmitTx service
Constructors
| TraceRpcSubmitN2cConnectionError SomeException | Node-to-client connection error during submission |
| TraceRpcSubmitTxDecodingError DecoderError | Transaction deserialisation error |
| TraceRpcSubmitTxValidationError TxValidationErrorInCardanoMode | Transaction submission error |
| TraceRpcSubmitSpan TraceSpanEvent | Transaction submission span |
| TraceRpcEvalTxDecodingError SerialiseAsRawBytesError | Transaction evaluation deserialisation error |
| TraceRpcEvalTxSpan TraceSpanEvent | Transaction evaluation span |
Instances
| Error TraceRpcSubmit Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing Methods prettyError :: TraceRpcSubmit -> Doc ann Source # | |
| Show TraceRpcSubmit Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing | |
| Pretty TraceRpcSubmit Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing | |
| Inject TraceRpcSubmit TraceRpc Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing Methods inject :: TraceRpcSubmit -> TraceRpc Source # | |
data TraceRpcQuery Source #
Traces used in Query service
Constructors
| TraceRpcQueryParamsSpan TraceSpanEvent | Span trace marking ReadParams query |
| TraceRpcQueryReadUtxosSpan TraceSpanEvent | Span trace marking ReadUtxos query |
| TraceRpcQuerySearchUtxosSpan TraceSpanEvent | Span trace marking SearchUtxos query |
Instances
| Error TraceRpcQuery Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing Methods prettyError :: TraceRpcQuery -> Doc ann Source # | |
| Show TraceRpcQuery Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing | |
| Pretty TraceRpcQuery Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing | |
| Inject TraceRpcQuery TraceRpc Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing Methods inject :: TraceRpcQuery -> TraceRpc Source # | |
data TraceRpcSync Source #
Traces used in SyncService (FetchBlock, FollowTip)
Constructors
| TraceRpcFetchBlockSpan TraceSpanEvent | FetchBlock span |
| TraceRpcFetchBlockNotFound SlotNo | Requested block was not found |
| TraceRpcNodeKernelAccessUnavailable | Node kernel access is not yet available |
| TraceRpcForkerError String | Ledger forker error |
Instances
| Error TraceRpcSync Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing Methods prettyError :: TraceRpcSync -> Doc ann Source # | |
| Show TraceRpcSync Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing | |
| Pretty TraceRpcSync Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing | |
| Inject TraceRpcSync TraceRpc Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing Methods inject :: TraceRpcSync -> TraceRpc Source # | |
data TraceSpanEvent Source #
Span type
Instances
| Show TraceSpanEvent Source # | |
Defined in Cardano.Rpc.Server.Internal.Tracing | |