second-transfer-0.5.3.2: Second Transfer HTTP/2 web server

Safe HaskellNone
LanguageHaskell2010

SecondTransfer.Sessions.Config

Description

Configuration and settings for the server. All constructor names are exported, but notice that they start with an underscore. They also have an equivalent lens without the underscore. Please prefer to use the lens interface.

Synopsis

Documentation

sessionId :: Functor f => (Int -> f Int) -> SessionCoordinates -> f SessionCoordinates Source

Get/set a numeric Id from a SessionCoordinates. For example, to get the session id with this, import `Control.Lens.(^.)` and then do

     session_id = session_coordinates ^. sessionId

defaultSessionsConfig :: SessionsConfig Source

Creates a default sessions context. Modify as needed using the lenses interfaces

defaultSessionsEnrichedHeaders :: SessionsEnrichedHeaders Source

Don't insert any extra-headers by default.

data SessionComponent Source

Components at an individual session. Used to report where in the session an error was produced. This interface is likely to change in the future, as we add more metadata to exceptions

Instances

newtype SessionCoordinates Source

Information used to identify a particular session.

Constructors

SessionCoordinates Int 

data SessionsCallbacks Source

Callbacks that you can provide your sessions to notify you of interesting things happening in the server.

data SessionsEnrichedHeaders Source

This is a temporal interface, but an useful one nonetheless. By setting some values here to True, second-transfer will add some headers to inbound requests, and some headers to outbound requests.

Constructors

SessionsEnrichedHeaders 

Fields

_addUsedProtocol :: Bool

Adds a second-transfer-eh--used-protocol header to inbound requests. Default: False

data SessionsConfig Source

Configuration information you can provide to the session maker.

type ErrorCallback = (SessionComponent, SessionCoordinates, SomeException) -> IO () Source

Used by this session engine to report an error at some component, in a particular session.