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

Safe HaskellNone
LanguageHaskell2010

SecondTransfer.Sessions.Config

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

sessionsCallbacks :: Lens' SessionsConfig SessionsCallbacks Source

Lens to access sessionsCallbacks in the SessionsConfig object.

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

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 SessionsConfig Source

Configuration information you can provide to the session maker.

Constructors

SessionsConfig 

Fields

_sessionsCallbacks :: SessionsCallbacks

Session callbacks

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

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