Documentation ¶
Index ¶
- Constants
- type CPUPredicate
- func (f *CPUPredicate) Clone() core.FitPredicate
- func (f *CPUPredicate) Execute(ctx context.Context, u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
- func (f *CPUPredicate) Name() string
- func (f *CPUPredicate) PreExecute(ctx context.Context, u *core.Unit, cs []core.Candidater) (bool, error)
- type HypervisorPredicate
- type ImagePredicate
- func (f *ImagePredicate) Clone() core.FitPredicate
- func (f *ImagePredicate) Execute(ctx context.Context, u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
- func (f *ImagePredicate) Name() string
- func (f *ImagePredicate) PreExecute(ctx context.Context, u *core.Unit, cs []core.Candidater) (bool, error)
- type MemoryPredicate
- func (p *MemoryPredicate) Clone() core.FitPredicate
- func (p *MemoryPredicate) Execute(ctx context.Context, u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
- func (p *MemoryPredicate) Name() string
- func (p *MemoryPredicate) PreExecute(ctx context.Context, u *core.Unit, cs []core.Candidater) (bool, error)
- type MigratePredicate
- func (p *MigratePredicate) Clone() core.FitPredicate
- func (p *MigratePredicate) Execute(ctx context.Context, u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
- func (p *MigratePredicate) Name() string
- func (p *MigratePredicate) PreExecute(ctx context.Context, u *core.Unit, cs []core.Candidater) (bool, error)
- type StatusPredicate
- type StoragePredicate
- func (p *StoragePredicate) Clone() core.FitPredicate
- func (p *StoragePredicate) Execute(ctx context.Context, u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
- func (p *StoragePredicate) Name() string
- func (p *StoragePredicate) PreExecute(ctx context.Context, u *core.Unit, cs []core.Candidater) (bool, error)
Constants ¶
const ( ExpectedStatus = "running" ExpectedHostStatus = "online" ExpectedEnableStatus = "enable" )
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 (f *CPUPredicate) Execute(ctx context.Context, u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (f *HypervisorPredicate) Clone() core.FitPredicate
func (*HypervisorPredicate) Execute ¶
func (f *HypervisorPredicate) Execute(ctx context.Context, u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (f *ImagePredicate) Execute(ctx context.Context, u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (p *MemoryPredicate) Execute(ctx context.Context, u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (p *MigratePredicate) Execute(ctx context.Context, u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (p *StatusPredicate) Execute(ctx context.Context, u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (p *StoragePredicate) Execute(ctx context.Context, u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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)