guest

package
v0.3.10-0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ExpectedStatus       = "running"
	ExpectedHostStatus   = "online"
	ExpectedEnableStatus = "enable"
)
View Source
const (
	CONTAINER_ALLOWED_TAG = "container"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUPredicate

type CPUPredicate struct {
	predicates.BasePredicate
}

CPUPredicate check the current resources of the CPU is available, it returns the maximum available capacity.

func (*CPUPredicate) Clone

func (f *CPUPredicate) Clone() core.FitPredicate

func (*CPUPredicate) Execute

func (*CPUPredicate) Name

func (f *CPUPredicate) Name() string

func (*CPUPredicate) PreExecute

func (f *CPUPredicate) PreExecute(ctx context.Context, u *core.Unit, cs []core.Candidater) (bool, error)

type HypervisorPredicate

type HypervisorPredicate struct {
	predicates.BasePredicate
}

HypervisorPredicate is to select candidates match guest hyperviosr runtime

func (*HypervisorPredicate) Clone

func (*HypervisorPredicate) Execute

func (*HypervisorPredicate) Name

func (f *HypervisorPredicate) Name() string

type ImagePredicate

type ImagePredicate struct {
	predicates.BasePredicate
	// contains filtered or unexported fields
}

func (*ImagePredicate) Clone

func (f *ImagePredicate) Clone() core.FitPredicate

func (*ImagePredicate) Execute

func (*ImagePredicate) Name

func (f *ImagePredicate) Name() string

func (*ImagePredicate) PreExecute

func (f *ImagePredicate) PreExecute(ctx context.Context, u *core.Unit, cs []core.Candidater) (bool, error)

type MemoryPredicate

type MemoryPredicate struct {
	predicates.BasePredicate
}

MemoryPredicate filter current resources free memory capacity is meet, if it is satisfied to return the size of the memory that can carry the scheduling request.

func (*MemoryPredicate) Clone

func (p *MemoryPredicate) Clone() core.FitPredicate

func (*MemoryPredicate) Execute

func (*MemoryPredicate) Name

func (p *MemoryPredicate) Name() string

func (*MemoryPredicate) PreExecute

func (p *MemoryPredicate) PreExecute(ctx context.Context, u *core.Unit, cs []core.Candidater) (bool, error)

type MigratePredicate

type MigratePredicate struct {
	predicates.BasePredicate
}

MigratePredicate filters whether the current candidate can be migrated.

func (*MigratePredicate) Clone

func (p *MigratePredicate) Clone() core.FitPredicate

func (*MigratePredicate) Execute

func (*MigratePredicate) Name

func (p *MigratePredicate) Name() string

func (*MigratePredicate) PreExecute

func (p *MigratePredicate) PreExecute(ctx context.Context, u *core.Unit, cs []core.Candidater) (bool, error)

type StatusPredicate

type StatusPredicate struct {
	predicates.BasePredicate
}

StatusPredicate is to filter the current state of host is available, not available host's capacity will be set to 0 and filtered out.

func (*StatusPredicate) Clone

func (p *StatusPredicate) Clone() core.FitPredicate

func (*StatusPredicate) Execute

func (*StatusPredicate) Name

func (p *StatusPredicate) Name() string

type StoragePredicate

type StoragePredicate struct {
	predicates.BasePredicate
}

StoragePredicate used to filter whether the storage capacity of the current candidate matches the type of the disk. If not matched, the storage capacity will be set to 0.

func (*StoragePredicate) Clone

func (p *StoragePredicate) Clone() core.FitPredicate

func (*StoragePredicate) Execute

func (*StoragePredicate) Name

func (p *StoragePredicate) Name() string

func (*StoragePredicate) PreExecute

func (p *StoragePredicate) PreExecute(ctx context.Context, u *core.Unit, cs []core.Candidater) (bool, error)

Jump to

Keyboard shortcuts

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