hardware

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package hardware is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListValidDisks added in v1.0.7

func ListValidDisks(inventory *models.Inventory, minSizeRequiredInBytes int64) []*models.Disk

Types

type MockValidator

type MockValidator struct {
	// contains filtered or unexported fields
}

MockValidator is a mock of Validator interface

func NewMockValidator

func NewMockValidator(ctrl *gomock.Controller) *MockValidator

NewMockValidator creates a new mock instance

func (*MockValidator) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockValidator) GetHostValidDisks

func (m *MockValidator) GetHostValidDisks(host *models.Host) ([]*models.Disk, error)

GetHostValidDisks mocks base method

type MockValidatorMockRecorder

type MockValidatorMockRecorder struct {
	// contains filtered or unexported fields
}

MockValidatorMockRecorder is the mock recorder for MockValidator

func (*MockValidatorMockRecorder) GetHostValidDisks

func (mr *MockValidatorMockRecorder) GetHostValidDisks(host interface{}) *gomock.Call

GetHostValidDisks indicates an expected call of GetHostValidDisks

type Validator

type Validator interface {
	GetHostValidDisks(host *models.Host) ([]*models.Disk, error)
}

func NewValidator

func NewValidator(log logrus.FieldLogger, cfg ValidatorCfg) Validator

type ValidatorCfg

type ValidatorCfg struct {
	MinCPUCores       int64 `envconfig:"HW_VALIDATOR_MIN_CPU_CORES" default:"2"`
	MinCPUCoresWorker int64 `envconfig:"HW_VALIDATOR_MIN_CPU_CORES_WORKER" default:"2"`
	MinCPUCoresMaster int64 `envconfig:"HW_VALIDATOR_MIN_CPU_CORES_MASTER" default:"4"`
	MinRamGib         int64 `envconfig:"HW_VALIDATOR_MIN_RAM_GIB" default:"8"`
	MinRamGibWorker   int64 `envconfig:"HW_VALIDATOR_MIN_RAM_GIB_WORKER" default:"8"`
	MinRamGibMaster   int64 `envconfig:"HW_VALIDATOR_MIN_RAM_GIB_MASTER" default:"16"`
	MinDiskSizeGb     int64 `envconfig:"HW_VALIDATOR_MIN_DISK_SIZE_GIB" default:"120"` // Env variable is GIB to not break infra
}

Jump to

Keyboard shortcuts

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