ganeti

Safe HaskellSafe-Infered

Ganeti.Query.Types

Description

Implementation of the Ganeti Query2 basic types.

These are types internal to the library, and for example clients that use the library should not need to import it.

Synopsis

Documentation

data FieldGetter a b Source

The type of field getters. The "a" type represents the type we're querying, whereas the "b" type represents the 'runtime' data for that type (if any). Note that we don't support multiple runtime sources, and we always consider the entire configuration as a given (so no equivalent for Python's *_CONFIG and *_GROUP; configuration accesses are cheap for us).

data QffMode Source

Type defining how the value of a field is used in filtering. This implements the equivalent to Python's QFF_ flags, except that we don't use OR-able values.

Constructors

QffNormal

Value is used as-is in filters

QffTimestamp

Value is a timestamp tuple, convert to float

QffHostname

Value is a hostname, compare it smartly

Instances

Eq QffMode 
Show QffMode 

type FieldData a b = (FieldDefinition, FieldGetter a b, QffMode)Source

Alias for a field data (definition and getter).

type FieldList a b = [FieldData a b]Source

Alias for a field data list.

type FieldMap a b = Map String (FieldData a b)Source

Alias for field maps.

isRuntimeField :: FieldGetter a b -> BoolSource

Helper function to check if a getter is a runtime one.