HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulegrapesy-1.1.1Haskell2010

Network.GRPC.Server.Run

Convenience functions for running a HTTP2 server

Intended for unqualified import.

  • 6 types
  • 9 values
  • Packagegrapesy-1.1.1
  • Exports15
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceRun.hs

Configuration

3 declarations
datadata ServerConfig
#

Server configuration

Describes the configuration of both an insecure server and a secure server. See the documentation of runServer for a description of what servers will result from various configurations.

Constructors

Instances3Show, Generic, Rep
datadata InsecureConfig
#

Offer insecure connection (no TLS)

Constructors

Instances3Show, Generic, Rep
datadata SecureConfig
#

Offer secure connection (over TLS)

Constructors

Instances3Show, Generic, Rep

Simple interface

2 declarations
valuerunServer :: HTTP2Settings -> ServerConfig -> Server -> IO ()
#

Run a Server with the given ServerConfig.

If both configurations are disabled, runServer will simply immediately return. If both configurations are enabled, then two servers will be run concurrently; one with the insecure configuration and the other with the secure configuration. Obviously, if only one of the configurations is enabled, then just that server will be run.

See also runServerWithHandlers, which handles the creation of the Server for you.

Full interface

8 declarations

Get the socket used by the insecure server

The socket is created as the server initializes; this function will block until that is complete. However:

  • If the server throws an exception, that exception is rethrown here.

  • If the server has already terminated, we throw ServerTerminated

  • If the insecure server was not enabled, it is considered to have terminated immediately and the same ServerTerminated exception is thrown.

Exceptions

2 declarations