ngx-export-tools-1.0: Extra tools for Nginx haskell module
Copyright(c) Alexey Radkov 2018-2022
LicenseBSD-style
Maintaineralexey.radkov@gmail.com
Stabilitystable
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

NgxExport.Tools.SplitService

Description

 
Synopsis

Split services

Split services split the whole service into two separate actions for the first (ignition service) and the following (deferred service) runs.

Exported functions

splitService Source #

Arguments

:: (a -> IO ByteString)

Ignition service

-> (a -> IO ByteString)

Deferred service

-> a

Configuration

-> Bool

First-run flag

-> IO ByteString 

Sets two different actions as ignition and deferred services.

When used as a single-shot service (in terms of module NgxExport.Tools.SimpleService), the second action only runs on exit of a worker process, and therefore can be used as a cleanup handler.

ignitionService Source #

Arguments

:: (a -> IO ByteString)

Ignition service

-> a

Configuration

-> Bool

First-run flag

-> IO ByteString 

Sets an action as an ignition service.

deferredService Source #

Arguments

:: (a -> IO ByteString)

Deferred service

-> a

Configuration

-> Bool

First-run flag

-> IO ByteString 

Sets an action as a deferred service.

When used as a single-shot service (in terms of module NgxExport.Tools.SimpleService), the action only runs on exit of a worker process, and therefore can be used as a cleanup handler.