ganeti

Safe HaskellNone

Ganeti.WConfd.Client

Contents

Description

The Ganeti WConfd client functions.

The client functions are automatically generated from Ganeti.WConfd.Core

Synopsis

Generated client functions

echo :: String -> RpcClientMonad StringSource

Helper functions for creating the client

wconfdConnectConfig :: ConnectConfigSource

The default WConfd client configuration

getWConfdClient :: FilePath -> IO ClientSource

Given a socket path, creates a WConfd client with the default configuration and timeout.

runNewWConfdClient :: (MonadBase IO m, MonadBaseControl IO m, MonadError GanetiException m) => RpcClientMonad a -> m aSource

Run an Rpc with a fresh client.

Helper functions for getting a remote lock

waitLockConfigSource

Arguments

:: ClientId 
-> Bool

whether the lock shall be in shared mode

-> RpcClientMonad ConfigData 

Calls the lockConfig RPC until the lock is obtained.

withLockedConfigSource

Arguments

:: ClientId 
-> Bool

whether the lock shall be in shared mode

-> (ConfigData -> RpcClientMonad a)

action to run

-> RpcClientMonad a 

Calls the lockConfig RPC until the lock is obtained, runs a function on the obtained config, and calls unlockConfig.

Other functions

runModifyRpc :: RpcClientMonad Bool -> IO ()Source

Try an RPC until no errors occur and the result is true.