Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ganeti.HTools.Container
Description
Module abstracting the node and instance container implementation.
This is currently implemented on top of an IntMap
, which seems to
give the best performance for our workload.
Synopsis
- type Container = IntMap
- type Key = Key
- empty :: IntMap a
- singleton :: Key -> a -> IntMap a
- fromList :: [(Key, a)] -> IntMap a
- size :: IntMap a -> Int
- null :: IntMap a -> Bool
- find :: Key -> Container a -> a
- findMax :: IntMap a -> (Key, a)
- member :: Key -> IntMap a -> Bool
- lookup :: Key -> IntMap a -> Maybe a
- add :: Key -> a -> Container a -> Container a
- addTwo :: Key -> a -> Key -> a -> Container a -> Container a
- map :: (a -> b) -> IntMap a -> IntMap b
- mapAccum :: (a -> b -> (a, c)) -> a -> IntMap b -> (a, IntMap c)
- filter :: (a -> Bool) -> IntMap a -> IntMap a
- elems :: IntMap a -> [a]
- keys :: IntMap a -> [Key]
- nameOf :: Element a => Container a -> Key -> String
- findByName :: (Element a, MonadFail m) => Container a -> String -> m a