Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ResourceLimits = ResourceLimits {
- runResourceLimits :: forall m a. (MonadBaseControl IO m, MonadError QErr m) => m a -> m a
- class Monad m => HasResourceLimits m where
- askHTTPHandlerLimit :: m ResourceLimits
- askGraphqlOperationLimit :: RequestId -> m (UserInfo -> ApiLimit -> ResourceLimits)
Documentation
data ResourceLimits Source #
Resource limits, represented by a function which modifies IO actions to
enforce those limits by throwing errors using MonadError
in the case
where they are exceeded.
ResourceLimits | |
|
class Monad m => HasResourceLimits m where Source #
Monads which support resource (memory, CPU time, etc.) limiting
Nothing
askHTTPHandlerLimit :: m ResourceLimits Source #
default askHTTPHandlerLimit :: (m ~ t n, MonadTrans t, HasResourceLimits n) => m ResourceLimits Source #
askGraphqlOperationLimit :: RequestId -> m (UserInfo -> ApiLimit -> ResourceLimits) Source #
default askGraphqlOperationLimit :: (m ~ t n, MonadTrans t, HasResourceLimits n) => RequestId -> m (UserInfo -> ApiLimit -> ResourceLimits) Source #
Instances
HasResourceLimits m => HasResourceLimits (TraceT m) Source # | |
Defined in Hasura.Server.Limits askHTTPHandlerLimit :: TraceT m ResourceLimits Source # askGraphqlOperationLimit :: RequestId -> TraceT m (UserInfo -> ApiLimit -> ResourceLimits) Source # | |
HasResourceLimits m => HasResourceLimits (MetadataStorageT m) Source # | |
Defined in Hasura.Server.Limits | |
Monad m => HasResourceLimits (PGMetadataStorageAppT m) Source # | |
Defined in Hasura.App | |
HasResourceLimits m => HasResourceLimits (ExceptT e m) Source # | |
Defined in Hasura.Server.Limits askHTTPHandlerLimit :: ExceptT e m ResourceLimits Source # askGraphqlOperationLimit :: RequestId -> ExceptT e m (UserInfo -> ApiLimit -> ResourceLimits) Source # | |
HasResourceLimits m => HasResourceLimits (ReaderT r m) Source # | |
Defined in Hasura.Server.Limits askHTTPHandlerLimit :: ReaderT r m ResourceLimits Source # askGraphqlOperationLimit :: RequestId -> ReaderT r m (UserInfo -> ApiLimit -> ResourceLimits) Source # |