ganeti

Safe HaskellNone

Ganeti.WConfd.Persistent

Contents

Description

Common types and functions for persistent resources

In particular: - locks - temporary reservations

Synopsis

Common definitions

The data type that collects all required operations

data Persistent a Source #

A collection of operations needed for persisting a resource.

Constructors

Persistent 

Fields

Common functions

writePersistentAsyncTask :: JSON a => Persistent a -> IO a -> ResultG (AsyncWorker () ()) Source #

Construct an asynchronous worker whose action is to save the current state of the persistent state. The worker's action reads the state using the given IO action. Any inbetween changes to the file are tacitly ignored.

readPersistent :: JSON a => Persistent a -> ResultG a Source #

Load a persistent data structure from disk.

Implementations

Locks

Temporary reservations