| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Rpc.Server.Config
Synopsis
- type RpcConfig = RpcConfigF Identity
- type PartialRpcConfig = RpcConfigF Last
- data RpcConfigF (m :: Type -> Type) = RpcConfig {
- isEnabled :: !(m Bool)
- rpcEndpoint :: !(m RpcEndpoint)
- nodeSocketPath :: !(m SocketPath)
- data RpcEndpoint
- data RpcTlsFiles = RpcTlsFiles {
- certificateFile :: !(File TlsCertificate 'In)
- privateKeyFile :: !(File TlsPrivateKey 'In)
- chainCertificateFiles :: ![File TlsCertificate 'In]
- data TlsCertificate
- data TlsPrivateKey
- defaultRpcListenAddress :: IP
- makeRpcConfig :: MonadError String m => PartialRpcConfig -> m RpcConfig
- nodeSocketPathToRpcSocketPath :: SocketPath -> SocketPath
Documentation
type RpcConfig = RpcConfigF Identity Source #
type PartialRpcConfig = RpcConfigF Last Source #
data RpcConfigF (m :: Type -> Type) Source #
RPC server configuration, which is a part of cardano-node configuration.
Constructors
| RpcConfig | |
Fields
| |
Instances
data RpcEndpoint Source #
Endpoint the RPC server listens on. Exactly one listener is active at a time.
Constructors
| RpcEndpointUnixSocket !SocketPath | |
| RpcEndpointHttp !IP !PortNumber | IP address and port of the HTTP/2 without TLS (h2c) listener. |
| RpcEndpointHttps !IP !PortNumber !RpcTlsFiles | IP address, port and TLS credential files of the HTTP/2 over TLS listener. |
Instances
| Eq RpcEndpoint Source # | |
Defined in Cardano.Rpc.Server.Config Methods (==) :: RpcEndpoint -> RpcEndpoint -> Bool Source # (/=) :: RpcEndpoint -> RpcEndpoint -> Bool Source # | |
| Show RpcEndpoint Source # | |
Defined in Cardano.Rpc.Server.Config | |
| Pretty RpcEndpoint Source # | |
Defined in Cardano.Rpc.Server.Config | |
data RpcTlsFiles Source #
TLS credential files for the RPC server, PEM format.
Constructors
| RpcTlsFiles | |
Fields
| |
Instances
| Eq RpcTlsFiles Source # | |
Defined in Cardano.Rpc.Server.Config Methods (==) :: RpcTlsFiles -> RpcTlsFiles -> Bool Source # (/=) :: RpcTlsFiles -> RpcTlsFiles -> Bool Source # | |
| Show RpcTlsFiles Source # | |
Defined in Cardano.Rpc.Server.Config | |
data TlsCertificate Source #
Empty content tag for File identifying a TLS certificate file.
data TlsPrivateKey Source #
Empty content tag for File identifying a TLS private key file.
defaultRpcListenAddress :: IP Source #
Default IP address the HTTP/2 listener binds to when only a port is configured.
makeRpcConfig :: MonadError String m => PartialRpcConfig -> m RpcConfig Source #
Build RPC Config
Uses the following defaults if the values are not provided
* RPC is disabled
* the endpoint is a unix socket, rpc.sock, placed in the same path as the node socket
Validates if the node socket is enabled if RPC is enabled.
nodeSocketPathToRpcSocketPath :: SocketPath -> SocketPath Source #
Convert node socket path to a default rpc socket path.
By default it's rpc.sock in the same directory as node socket path.