ganeti-3.1: Cluster-based virtualization management software
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ganeti.Locking.Types

Description

Ganeti lock-related types and type classes

Synopsis

Documentation

class (Ord a, Show a) => Lock a #

The type class of being a lock

As usual, locks need to come with an order, the lock order, and be an instance of Show, so that malformed requests can meaningfully be reported.

Additionally, in Ganeti we also have group locks, like a lock for all nodes. While those group locks contain infinitely many locks, the set of locks a single lock is included in is always finite, and usually very small. So we take this association from a lock to the locks it is (strictly) included in as additional data of the type class.

It is a prerequisite that whenever a is implied in b, then all locks that are in the lock order between a and b are also implied in b.

Minimal complete definition

lockImplications

Instances

Instances details
Lock GanetiLocks # 
Instance details

Defined in Ganeti.Locking.Locks

lockImplications :: Lock a => a -> [a] #