propellor-5.13: property-based host configuration management in haskell

Maintainer | Sean Whitton <spwhitton@spwhitton.name>
Safe Haskell | None
Language | Haskell2010

Propellor.Property.Ccache

Description

Synopsis

- hasCache :: Group -> Limit -> RevertableProperty DebianLike UnixLike
- hasLimits :: FilePath -> Limit -> Property DebianLike
- data Limit
  - = MaxSize DataSize
  - | MaxFiles Integer
  - | NoLimit
  - | Limit :+ Limit
- type DataSize = String

# Documentation

hasCache :: Group -> Limit -> RevertableProperty DebianLike UnixLike Source #

Configures a ccache in varcache for a group

If you say

    & (Group "foo") `Ccache.hasGroupCache`
    	(Ccache.MaxSize "4G" <> Ccache.MaxFiles 10000)

you instruct propellor to create a ccache in varcache/ccache-foo owned and writeable by the foo group, with a maximum cache size of 4GB or 10000 files.

hasLimits :: FilePath -> Limit -> Property DebianLike Source #

Set limits on a given ccache

data Limit Source #

Limits on the size of a ccache

Constructors

MaxSize DataSize | The maximum size of the cache, as a string such as "4G"
MaxFiles Integer | The maximum number of files in the cache
NoLimit | A cache with no limit specified
Limit :+ Limit |

#### Instances

Instances details

Semigroup Limit Source # |
Instance details Defined in Propellor.Property.Ccache Methods (<>) :: Limit -> Limit -> Limit # sconcat :: NonEmpty Limit -> Limit stimes :: Integral b => b -> Limit -> Limit
Monoid Limit Source # |
Instance details Defined in Propellor.Property.Ccache Methods mempty :: Limit # mappend :: Limit -> Limit -> Limit # mconcat :: [Limit] -> Limit #

type DataSize = String Source #

A string that will be parsed to get a data size.

Examples: "100 megabytes" or "0.5tb"