hslogstash-0.2.3: A library to work with, or as, a logstash server

Safe HaskellNone

Data.Conduit.Branching

Description

Branching conduits

WARNING: executables using this function must be compiled with -threaded

Documentation

mkBranchingConduitSource

Arguments

:: MonadResource m 
=> Int

Number of branches

-> (a -> [Int])

Branching function, where 0 is the first branch

-> IO (Sink a m (), [Source m a])

Returns a sink and N sources

branchConduitsSource

Arguments

:: Source (ResourceT IO) a

The source to branch from

-> (a -> [Int])

The branching function (0 is the first sink)

-> [Sink a (ResourceT IO) ()]

The destination sinks

-> IO ()

Results of the sinks