Safe Haskell | None |
---|
Implementation of the Ganeti confd types.
Synopsis
- data ConfdRequestType
- confdRequestTypeFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdRequestType
- confdRequestTypeToRaw :: ConfdRequestType -> Int
- _ReqDataCollectors :: Int
- _ReqConfigQuery :: Int
- _ReqInstanceDisks :: Int
- _ReqNodeInstances :: Int
- _ReqNodeDrbd :: Int
- _ReqInstIpsList :: Int
- _ReqMcPipList :: Int
- _ReqNodePipList :: Int
- _ReqClusterMaster :: Int
- _ReqNodePipByInstPip :: Int
- _ReqNodeRoleByName :: Int
- _ReqPing :: Int
- data ConfdReqField
- confdReqFieldFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdReqField
- confdReqFieldToRaw :: ConfdReqField -> Int
- _ReqFieldMNodePip :: Int
- _ReqFieldIp :: Int
- _ReqFieldName :: Int
- data ConfdReqQ = ConfdReqQ {
- confdReqQIp :: (Maybe String)
- confdReqQIpList :: [String]
- confdReqQLink :: (Maybe String)
- confdReqQFields :: [ConfdReqField]
- loadConfdReqQ :: JSValue -> Result ConfdReqQ
- saveConfdReqQ :: ConfdReqQ -> JSValue
- data ConfdQuery
- = EmptyQuery
- | PlainQuery String
- | DictQuery ConfdReqQ
- data ConfdReplyStatus
- confdReplyStatusFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdReplyStatus
- confdReplyStatusToRaw :: ConfdReplyStatus -> Int
- _ReplyStatusNotImpl :: Int
- _ReplyStatusError :: Int
- _ReplyStatusOk :: Int
- data ConfdNodeRole
- confdNodeRoleFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdNodeRole
- confdNodeRoleToRaw :: ConfdNodeRole -> Int
- _NodeRoleRegular :: Int
- _NodeRoleDrained :: Int
- _NodeRoleOffline :: Int
- _NodeRoleCandidate :: Int
- _NodeRoleMaster :: Int
- data ConfdErrorType
- confdErrorTypeFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdErrorType
- confdErrorTypeToRaw :: ConfdErrorType -> Int
- _ConfdErrorArgument :: Int
- _ConfdErrorInternal :: Int
- _ConfdErrorUnknownEntry :: Int
- data ConfdRequest = ConfdRequest {
- confdRqProtocol :: Int
- confdRqType :: ConfdRequestType
- confdRqQuery :: ConfdQuery
- confdRqRsalt :: String
- loadConfdRequest :: JSValue -> Result ConfdRequest
- saveConfdRequest :: ConfdRequest -> JSValue
- newConfdRequest :: ConfdRequestType -> ConfdQuery -> IO ConfdRequest
- data ConfdReply = ConfdReply {
- confdReplyProtocol :: Int
- confdReplyStatus :: ConfdReplyStatus
- confdReplyAnswer :: JSValue
- confdReplySerial :: Int
- loadConfdReply :: JSValue -> Result ConfdReply
- saveConfdReply :: ConfdReply -> JSValue
- data SignedMessage = SignedMessage {
- signedMsgHmac :: String
- signedMsgMsg :: String
- signedMsgSalt :: String
- loadSignedMessage :: JSValue -> Result SignedMessage
- saveSignedMessage :: SignedMessage -> JSValue
- data ConfdClient = ConfdClient {
- hmacKey :: HashKey
- peers :: [String]
- serverPort :: PortNumber
Documentation
data ConfdRequestType Source #
ReqPing | |
ReqNodeRoleByName | |
ReqNodePipByInstPip | |
ReqClusterMaster | |
ReqNodePipList | |
ReqMcPipList | |
ReqInstIpsList | |
ReqNodeDrbd | |
ReqNodeInstances | |
ReqInstanceDisks | |
ReqConfigQuery | |
ReqDataCollectors |
Instances
confdRequestTypeFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdRequestType Source #
confdRequestTypeToRaw :: ConfdRequestType -> Int Source #
_ReqDataCollectors :: Int Source #
_ReqConfigQuery :: Int Source #
_ReqInstanceDisks :: Int Source #
_ReqNodeInstances :: Int Source #
_ReqNodeDrbd :: Int Source #
_ReqInstIpsList :: Int Source #
_ReqMcPipList :: Int Source #
_ReqNodePipList :: Int Source #
_ReqClusterMaster :: Int Source #
_ReqNodePipByInstPip :: Int Source #
_ReqNodeRoleByName :: Int Source #
data ConfdReqField Source #
Instances
confdReqFieldFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdReqField Source #
confdReqFieldToRaw :: ConfdReqField -> Int Source #
_ReqFieldMNodePip :: Int Source #
_ReqFieldIp :: Int Source #
_ReqFieldName :: Int Source #
ConfdReqQ | |
|
Instances
Eq ConfdReqQ # | |
Show ConfdReqQ # | |
JSON ConfdReqQ # | |
ArrayObject ConfdReqQ # | |
Defined in Ganeti.Confd.Types | |
DictObject ConfdReqQ # | |
Arbitrary ConfdReqQ | |
loadConfdReqQ :: JSValue -> Result ConfdReqQ Source #
saveConfdReqQ :: ConfdReqQ -> JSValue Source #
data ConfdQuery Source #
Confd query type. This is complex enough that we can't automatically derive it via THH.
EmptyQuery | |
PlainQuery String | |
DictQuery ConfdReqQ |
Instances
Eq ConfdQuery # | |
Defined in Ganeti.Confd.Types (==) :: ConfdQuery -> ConfdQuery -> Bool (/=) :: ConfdQuery -> ConfdQuery -> Bool | |
Show ConfdQuery # | |
Defined in Ganeti.Confd.Types showsPrec :: Int -> ConfdQuery -> ShowS show :: ConfdQuery -> String showList :: [ConfdQuery] -> ShowS | |
JSON ConfdQuery # | |
Defined in Ganeti.Confd.Types readJSON :: JSValue -> Result ConfdQuery showJSON :: ConfdQuery -> JSValue readJSONs :: JSValue -> Result [ConfdQuery] showJSONs :: [ConfdQuery] -> JSValue | |
Arbitrary ConfdQuery | |
Defined in Test.Ganeti.Confd.Types arbitrary :: Gen ConfdQuery shrink :: ConfdQuery -> [ConfdQuery] |
data ConfdReplyStatus Source #
Instances
confdReplyStatusFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdReplyStatus Source #
confdReplyStatusToRaw :: ConfdReplyStatus -> Int Source #
_ReplyStatusNotImpl :: Int Source #
_ReplyStatusError :: Int Source #
_ReplyStatusOk :: Int Source #
data ConfdNodeRole Source #
Instances
confdNodeRoleFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdNodeRole Source #
confdNodeRoleToRaw :: ConfdNodeRole -> Int Source #
_NodeRoleRegular :: Int Source #
_NodeRoleDrained :: Int Source #
_NodeRoleOffline :: Int Source #
_NodeRoleCandidate :: Int Source #
_NodeRoleMaster :: Int Source #
data ConfdErrorType Source #
Instances
confdErrorTypeFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdErrorType Source #
confdErrorTypeToRaw :: ConfdErrorType -> Int Source #
_ConfdErrorArgument :: Int Source #
_ConfdErrorInternal :: Int Source #
_ConfdErrorUnknownEntry :: Int Source #
data ConfdRequest Source #
ConfdRequest | |
|
Instances
loadConfdRequest :: JSValue -> Result ConfdRequest Source #
saveConfdRequest :: ConfdRequest -> JSValue Source #
newConfdRequest :: ConfdRequestType -> ConfdQuery -> IO ConfdRequest Source #
Client side helper function for creating requests. It automatically fills in some default values.
data ConfdReply Source #
ConfdReply | |
|
Instances
loadConfdReply :: JSValue -> Result ConfdReply Source #
saveConfdReply :: ConfdReply -> JSValue Source #
data SignedMessage Source #
SignedMessage | |
|
Instances
Eq SignedMessage # | |
Defined in Ganeti.Confd.Types (==) :: SignedMessage -> SignedMessage -> Bool (/=) :: SignedMessage -> SignedMessage -> Bool | |
Show SignedMessage # | |
Defined in Ganeti.Confd.Types showsPrec :: Int -> SignedMessage -> ShowS show :: SignedMessage -> String showList :: [SignedMessage] -> ShowS | |
JSON SignedMessage # | |
Defined in Ganeti.Confd.Types readJSON :: JSValue -> Result SignedMessage showJSON :: SignedMessage -> JSValue readJSONs :: JSValue -> Result [SignedMessage] showJSONs :: [SignedMessage] -> JSValue | |
ArrayObject SignedMessage # | |
Defined in Ganeti.Confd.Types toJSArray :: SignedMessage -> [JSValue] Source # fromJSArray :: [JSValue] -> Result SignedMessage Source # | |
DictObject SignedMessage # | |
Defined in Ganeti.Confd.Types toDict :: SignedMessage -> [(String, JSValue)] Source # fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result SignedMessage Source # fromDict :: [(String, JSValue)] -> Result SignedMessage Source # |
loadSignedMessage :: JSValue -> Result SignedMessage Source #
saveSignedMessage :: SignedMessage -> JSValue Source #
data ConfdClient Source #
Data type containing information used by the Confd client.
ConfdClient | |
|