cachix-0.3.8: Command line client for Nix binary cache hosting https://cachix.org
Safe HaskellNone
LanguageHaskell2010

Cachix.Client.Push

Synopsis

Pushing a single path

pushSingleStorePath Source #

Arguments

:: (MonadMask m, MonadIO m) 
=> ClientEnv

cachix base url, connection manager, see defaultCachixBaseUrl, mkClientEnv

-> Store 
-> PushCache

details for pushing to cache

-> PushStrategy m r

how to report results, (some) errors, and do some things

-> Text

store path

-> m r

r is determined by the PushStrategy

data PushStrategy m r Source #

Constructors

PushStrategy 

Fields

defaultWithXzipCompressor :: forall m a. (ConduitM ByteString ByteString (ResourceT IO) () -> m a) -> m a Source #

defaultWithXzipCompressorWithLevel :: Int -> forall m a. (ConduitM ByteString ByteString (ResourceT IO) () -> m a) -> m a Source #

Pushing a closure of store paths

pushClosure Source #

Arguments

:: (MonadIO m, MonadMask m) 
=> (forall a b. (a -> m b) -> [a] -> m [b])

Traverse paths, responsible for bounding parallel processing of paths

For example: mapConcurrentlyBounded 4

-> ClientEnv

See pushSingleStorePath

-> Store 
-> PushCache 
-> (Text -> PushStrategy m r) 
-> [Text]

Initial store paths

-> m [r]

Every r per store path of the entire closure of store paths

Push an entire closure

Note: onAlreadyPresent will be called less often in the future.

mapConcurrentlyBounded :: Traversable t => Int -> (a -> IO b) -> t a -> IO (t b) Source #