selector

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareOperator added in v0.1.4

func CompareOperator(op string, key string, reqValue string, value interface{}) (bool, error)

CompareOperator ...

func GetPoolCapabilityMap added in v0.1.5

func GetPoolCapabilityMap(pool *model.StoragePoolSpec) (map[string]interface{}, error)

GetPoolCapabilityMap ...

func InOperator added in v0.1.4

func InOperator(key string, reqValue string, value interface{}) (bool, error)

InOperator ...

func IsAvailablePool added in v0.1.4

func IsAvailablePool(filterReq map[string]interface{}, pool *model.StoragePoolSpec) (bool, error)

IsAvailablePool ...

func OrOperator added in v0.1.4

func OrOperator(key string, words []string, value interface{}) (bool, error)

OrOperator ...

func ParseBoolAndCompare added in v0.1.4

func ParseBoolAndCompare(key string, a interface{}, b string) (bool, error)

ParseBoolAndCompare ...

func ParseFloat64AndCompare added in v0.1.4

func ParseFloat64AndCompare(op string, key string, a interface{}, b string) (bool, error)

ParseFloat64AndCompare ...

func SelectSupportedPools added in v0.1.4

func SelectSupportedPools(maxNum int, filterReq map[string]interface{}, pools []*model.StoragePoolSpec) ([]*model.StoragePoolSpec, error)

SelectSupportedPools ...

func StringCompare added in v0.1.4

func StringCompare(op string, key string, a string, b string) (bool, error)

StringCompare ...

Types

type Selector

type Selector interface {
	SelectSupportedPool(map[string]interface{}) (*model.StoragePoolSpec, error)
	SelectSupportedPoolForVG(*model.VolumeGroupSpec) (*model.StoragePoolSpec, error)
}

Selector is an interface that exposes some operation of different selectors.

func NewSelector

func NewSelector() Selector

NewSelector method creates a new selector structure and return its pointer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL