ganeti

Safe HaskellNone

Ganeti.Confd.Types

Description

Implementation of the Ganeti confd types.

Synopsis

Documentation

confdRequestTypeFromRaw :: forall m. Monad m => Int -> m ConfdRequestTypeSource

confdReqFieldFromRaw :: forall m. Monad m => String -> m ConfdReqFieldSource

data ConfdReqQ Source

Constructors

ConfdReqQ 

Fields

confdReqQIp :: Maybe String
 
confdReqQIpList :: [String]
 
confdReqQLink :: Maybe String
 
confdReqQFields :: [ConfdReqField]
 

Instances

Eq ConfdReqQ 
Show ConfdReqQ 
Arbitrary ConfdReqQ 
JSON ConfdReqQ 

loadConfdReqQ :: JSValue -> Result ConfdReqQSource

toDictConfdReqQ :: ConfdReqQ -> [(String, JSValue)]Source

data ConfdQuery Source

Confd query type. This is complex enough that we can't automatically derive it via THH.

Constructors

EmptyQuery 
PlainQuery String 
DictQuery ConfdReqQ 

Instances

Eq ConfdQuery 
Show ConfdQuery 
Arbitrary ConfdQuery 
JSON ConfdQuery 

confdReplyStatusFromRaw :: forall m. Monad m => Int -> m ConfdReplyStatusSource

confdNodeRoleFromRaw :: forall m. Monad m => Int -> m ConfdNodeRoleSource

confdErrorTypeFromRaw :: forall m. Monad m => Int -> m ConfdErrorTypeSource

toDictConfdRequest :: ConfdRequest -> [(String, JSValue)]Source

newConfdRequest :: ConfdRequestType -> ConfdQuery -> IO ConfdRequestSource

Client side helper function for creating requests. It automatically fills in some default values.

data ConfdReply Source

Instances

Eq ConfdReply 
Show ConfdReply 
Arbitrary ConfdReply 
JSON ConfdReply 

loadConfdReply :: JSValue -> Result ConfdReplySource

toDictConfdReply :: ConfdReply -> [(String, JSValue)]Source

data SignedMessage Source

Constructors

SignedMessage 

Fields

signedMsgHmac :: String
 
signedMsgMsg :: String
 
signedMsgSalt :: String
 

Instances

toDictSignedMessage :: SignedMessage -> [(String, JSValue)]Source

data ConfdClient Source

Data type containing information used by the Confd client.

Constructors

ConfdClient 

Fields

hmacKey :: HashKey

The hmac used for authentication

peers :: [String]

The list of nodes to query

serverPort :: PortNumber

The port where confd server is listening