ganeti
Safe HaskellNone

Ganeti.Confd.Types

Description

Implementation of the Ganeti confd types.

Synopsis

Documentation

data ConfdRequestType Source #

Instances

Instances details
Bounded ConfdRequestType # 
Instance details

Defined in Ganeti.Confd.Types

Enum ConfdRequestType # 
Instance details

Defined in Ganeti.Confd.Types

Eq ConfdRequestType # 
Instance details

Defined in Ganeti.Confd.Types

Ord ConfdRequestType # 
Instance details

Defined in Ganeti.Confd.Types

Show ConfdRequestType # 
Instance details

Defined in Ganeti.Confd.Types

Methods

showsPrec :: Int -> ConfdRequestType -> ShowS

show :: ConfdRequestType -> String

showList :: [ConfdRequestType] -> ShowS

JSON ConfdRequestType # 
Instance details

Defined in Ganeti.Confd.Types

Methods

readJSON :: JSValue -> Result ConfdRequestType

showJSON :: ConfdRequestType -> JSValue

readJSONs :: JSValue -> Result [ConfdRequestType]

showJSONs :: [ConfdRequestType] -> JSValue

Arbitrary ConfdRequestType 
Instance details

Defined in Test.Ganeti.Confd.Types

confdRequestTypeFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdRequestType Source #

data ConfdReqField Source #

Instances

Instances details
Bounded ConfdReqField # 
Instance details

Defined in Ganeti.Confd.Types

Enum ConfdReqField # 
Instance details

Defined in Ganeti.Confd.Types

Eq ConfdReqField # 
Instance details

Defined in Ganeti.Confd.Types

Ord ConfdReqField # 
Instance details

Defined in Ganeti.Confd.Types

Show ConfdReqField # 
Instance details

Defined in Ganeti.Confd.Types

Methods

showsPrec :: Int -> ConfdReqField -> ShowS

show :: ConfdReqField -> String

showList :: [ConfdReqField] -> ShowS

JSON ConfdReqField # 
Instance details

Defined in Ganeti.Confd.Types

Methods

readJSON :: JSValue -> Result ConfdReqField

showJSON :: ConfdReqField -> JSValue

readJSONs :: JSValue -> Result [ConfdReqField]

showJSONs :: [ConfdReqField] -> JSValue

Arbitrary ConfdReqField 
Instance details

Defined in Test.Ganeti.Confd.Types

confdReqFieldFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdReqField Source #

data ConfdReqQ Source #

Constructors

ConfdReqQ 

Fields

Instances

Instances details
Eq ConfdReqQ # 
Instance details

Defined in Ganeti.Confd.Types

Methods

(==) :: ConfdReqQ -> ConfdReqQ -> Bool

(/=) :: ConfdReqQ -> ConfdReqQ -> Bool

Show ConfdReqQ # 
Instance details

Defined in Ganeti.Confd.Types

Methods

showsPrec :: Int -> ConfdReqQ -> ShowS

show :: ConfdReqQ -> String

showList :: [ConfdReqQ] -> ShowS

JSON ConfdReqQ # 
Instance details

Defined in Ganeti.Confd.Types

Methods

readJSON :: JSValue -> Result ConfdReqQ

showJSON :: ConfdReqQ -> JSValue

readJSONs :: JSValue -> Result [ConfdReqQ]

showJSONs :: [ConfdReqQ] -> JSValue

ArrayObject ConfdReqQ # 
Instance details

Defined in Ganeti.Confd.Types

Methods

toJSArray :: ConfdReqQ -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result ConfdReqQ Source #

DictObject ConfdReqQ # 
Instance details

Defined in Ganeti.Confd.Types

Methods

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

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result ConfdReqQ Source #

fromDict :: [(String, JSValue)] -> Result ConfdReqQ Source #

Arbitrary ConfdReqQ 
Instance details

Defined in Test.Ganeti.Confd.Types

loadConfdReqQ :: JSValue -> Result ConfdReqQ 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

Instances details
Eq ConfdQuery # 
Instance details

Defined in Ganeti.Confd.Types

Methods

(==) :: ConfdQuery -> ConfdQuery -> Bool

(/=) :: ConfdQuery -> ConfdQuery -> Bool

Show ConfdQuery # 
Instance details

Defined in Ganeti.Confd.Types

Methods

showsPrec :: Int -> ConfdQuery -> ShowS

show :: ConfdQuery -> String

showList :: [ConfdQuery] -> ShowS

JSON ConfdQuery # 
Instance details

Defined in Ganeti.Confd.Types

Methods

readJSON :: JSValue -> Result ConfdQuery

showJSON :: ConfdQuery -> JSValue

readJSONs :: JSValue -> Result [ConfdQuery]

showJSONs :: [ConfdQuery] -> JSValue

Arbitrary ConfdQuery 
Instance details

Defined in Test.Ganeti.Confd.Types

data ConfdReplyStatus Source #

Instances

Instances details
Bounded ConfdReplyStatus # 
Instance details

Defined in Ganeti.Confd.Types

Enum ConfdReplyStatus # 
Instance details

Defined in Ganeti.Confd.Types

Eq ConfdReplyStatus # 
Instance details

Defined in Ganeti.Confd.Types

Ord ConfdReplyStatus # 
Instance details

Defined in Ganeti.Confd.Types

Show ConfdReplyStatus # 
Instance details

Defined in Ganeti.Confd.Types

Methods

showsPrec :: Int -> ConfdReplyStatus -> ShowS

show :: ConfdReplyStatus -> String

showList :: [ConfdReplyStatus] -> ShowS

JSON ConfdReplyStatus # 
Instance details

Defined in Ganeti.Confd.Types

Methods

readJSON :: JSValue -> Result ConfdReplyStatus

showJSON :: ConfdReplyStatus -> JSValue

readJSONs :: JSValue -> Result [ConfdReplyStatus]

showJSONs :: [ConfdReplyStatus] -> JSValue

Arbitrary ConfdReplyStatus 
Instance details

Defined in Test.Ganeti.Confd.Types

confdReplyStatusFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdReplyStatus Source #

data ConfdNodeRole Source #

Instances

Instances details
Bounded ConfdNodeRole # 
Instance details

Defined in Ganeti.Confd.Types

Enum ConfdNodeRole # 
Instance details

Defined in Ganeti.Confd.Types

Eq ConfdNodeRole # 
Instance details

Defined in Ganeti.Confd.Types

Ord ConfdNodeRole # 
Instance details

Defined in Ganeti.Confd.Types

Show ConfdNodeRole # 
Instance details

Defined in Ganeti.Confd.Types

Methods

showsPrec :: Int -> ConfdNodeRole -> ShowS

show :: ConfdNodeRole -> String

showList :: [ConfdNodeRole] -> ShowS

JSON ConfdNodeRole # 
Instance details

Defined in Ganeti.Confd.Types

Methods

readJSON :: JSValue -> Result ConfdNodeRole

showJSON :: ConfdNodeRole -> JSValue

readJSONs :: JSValue -> Result [ConfdNodeRole]

showJSONs :: [ConfdNodeRole] -> JSValue

Arbitrary ConfdNodeRole 
Instance details

Defined in Test.Ganeti.Confd.Types

confdNodeRoleFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdNodeRole Source #

data ConfdErrorType Source #

Instances

Instances details
Bounded ConfdErrorType # 
Instance details

Defined in Ganeti.Confd.Types

Enum ConfdErrorType # 
Instance details

Defined in Ganeti.Confd.Types

Eq ConfdErrorType # 
Instance details

Defined in Ganeti.Confd.Types

Ord ConfdErrorType # 
Instance details

Defined in Ganeti.Confd.Types

Show ConfdErrorType # 
Instance details

Defined in Ganeti.Confd.Types

Methods

showsPrec :: Int -> ConfdErrorType -> ShowS

show :: ConfdErrorType -> String

showList :: [ConfdErrorType] -> ShowS

JSON ConfdErrorType # 
Instance details

Defined in Ganeti.Confd.Types

Methods

readJSON :: JSValue -> Result ConfdErrorType

showJSON :: ConfdErrorType -> JSValue

readJSONs :: JSValue -> Result [ConfdErrorType]

showJSONs :: [ConfdErrorType] -> JSValue

Arbitrary ConfdErrorType 
Instance details

Defined in Test.Ganeti.Confd.Types

confdErrorTypeFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m ConfdErrorType Source #

data ConfdRequest Source #

Instances

Instances details
Eq ConfdRequest # 
Instance details

Defined in Ganeti.Confd.Types

Methods

(==) :: ConfdRequest -> ConfdRequest -> Bool

(/=) :: ConfdRequest -> ConfdRequest -> Bool

Show ConfdRequest # 
Instance details

Defined in Ganeti.Confd.Types

Methods

showsPrec :: Int -> ConfdRequest -> ShowS

show :: ConfdRequest -> String

showList :: [ConfdRequest] -> ShowS

JSON ConfdRequest # 
Instance details

Defined in Ganeti.Confd.Types

Methods

readJSON :: JSValue -> Result ConfdRequest

showJSON :: ConfdRequest -> JSValue

readJSONs :: JSValue -> Result [ConfdRequest]

showJSONs :: [ConfdRequest] -> JSValue

ArrayObject ConfdRequest # 
Instance details

Defined in Ganeti.Confd.Types

Methods

toJSArray :: ConfdRequest -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result ConfdRequest Source #

DictObject ConfdRequest # 
Instance details

Defined in Ganeti.Confd.Types

Methods

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

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result ConfdRequest Source #

fromDict :: [(String, JSValue)] -> Result ConfdRequest Source #

Arbitrary ConfdRequest 
Instance details

Defined in Test.Ganeti.Confd.Types

loadConfdRequest :: JSValue -> Result ConfdRequest Source #

newConfdRequest :: ConfdRequestType -> ConfdQuery -> IO ConfdRequest Source #

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

data ConfdReply Source #

Instances

Instances details
Eq ConfdReply # 
Instance details

Defined in Ganeti.Confd.Types

Methods

(==) :: ConfdReply -> ConfdReply -> Bool

(/=) :: ConfdReply -> ConfdReply -> Bool

Show ConfdReply # 
Instance details

Defined in Ganeti.Confd.Types

Methods

showsPrec :: Int -> ConfdReply -> ShowS

show :: ConfdReply -> String

showList :: [ConfdReply] -> ShowS

JSON ConfdReply # 
Instance details

Defined in Ganeti.Confd.Types

Methods

readJSON :: JSValue -> Result ConfdReply

showJSON :: ConfdReply -> JSValue

readJSONs :: JSValue -> Result [ConfdReply]

showJSONs :: [ConfdReply] -> JSValue

ArrayObject ConfdReply # 
Instance details

Defined in Ganeti.Confd.Types

Methods

toJSArray :: ConfdReply -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result ConfdReply Source #

DictObject ConfdReply # 
Instance details

Defined in Ganeti.Confd.Types

Methods

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

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result ConfdReply Source #

fromDict :: [(String, JSValue)] -> Result ConfdReply Source #

Arbitrary ConfdReply 
Instance details

Defined in Test.Ganeti.Confd.Types

loadConfdReply :: JSValue -> Result ConfdReply Source #

data SignedMessage Source #

Constructors

SignedMessage 

Fields

Instances

Instances details
Eq SignedMessage # 
Instance details

Defined in Ganeti.Confd.Types

Show SignedMessage # 
Instance details

Defined in Ganeti.Confd.Types

Methods

showsPrec :: Int -> SignedMessage -> ShowS

show :: SignedMessage -> String

showList :: [SignedMessage] -> ShowS

JSON SignedMessage # 
Instance details

Defined in Ganeti.Confd.Types

Methods

readJSON :: JSValue -> Result SignedMessage

showJSON :: SignedMessage -> JSValue

readJSONs :: JSValue -> Result [SignedMessage]

showJSONs :: [SignedMessage] -> JSValue

ArrayObject SignedMessage # 
Instance details

Defined in Ganeti.Confd.Types

Methods

toJSArray :: SignedMessage -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result SignedMessage Source #

DictObject SignedMessage # 
Instance details

Defined in Ganeti.Confd.Types

Methods

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

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result SignedMessage Source #

fromDict :: [(String, JSValue)] -> Result SignedMessage 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