cachix-0.6.1: 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) 
=> PushParams m r

details for pushing to cache

-> StorePath

store path

-> m r

r is determined by the PushStrategy

uploadStorePath Source #

Arguments

:: (MonadMask m, MonadIO m) 
=> PushParams m r

details for pushing to cache

-> StorePath 
-> RetryStatus 
-> m r

r is determined by the PushStrategy

data PushParams m r Source #

Constructors

PushParams 

Fields

data PushSecret Source #

Constructors

PushToken Token 
PushSigningKey Token SigningKey 

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 #

findPushSecret Source #

Arguments

:: Maybe Config 
-> Text

Cache name

-> IO PushSecret

Secret key or exception

Find auth token or signing key in the Config or environment variable

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

-> PushParams m r 
-> [StorePath]

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.

getMissingPathsForClosure :: (MonadIO m, MonadMask m) => PushParams m r -> [StorePath] -> m [StorePath] Source #

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