predicates

package
v0.0.0-...-6410feb Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrServerTypeIsNotMatch = `server type is not match`
	ErrExitIsNotMatch       = `exit is not match`
	ErrWireIsNotMatch       = `wire is not match`

	ErrNoPorts               = `no ports`
	ErrNotOwner              = `not owner`
	ErrNoEnoughStorage       = `no enough storage`
	ErrNoAvailableNetwork    = `no available network on this host`
	ErrNoEnoughAvailableGPUs = `no enough available GPUs`
	ErrNotSupportNest        = `nested function not supported`

	ErrRequireMvs                             = `require mvs`
	ErrRequireNoMvs                           = `require not mvs`
	ErrHostIsSpecifiedForMigration            = `host_id specified for migration`
	ErrHostCpuModelIsNotMatchForLiveMigrate   = `host cpu mode not match for live migrate`
	ErrHostCpuMicrocodeNotMatchForLiveMigrate = `host cpu microcode not match for live migrate`
	ErrHostMemPageSizeNotMatchForLiveMigrate  = `host mem page size not match for live migrate`
	ErrHostKernelNotMatchForLiveMigrate       = `host kernel not match for live migrate`
	ErrMoreThanOneSizeUnspecificSplit         = `more than 1 size unspecific split`
	ErrNoMoreSpaceForUnspecificSplit          = `no more space for an unspecific split`
	ErrSubtotalOfSplitExceedsDiskSize         = `subtotal of split exceeds disk size`
	ErrBaremetalHasAlreadyBeenOccupied        = `baremetal has already been occupied`
	ErrPrepaidHostOccupied                    = `prepaid host occupied`
	ErrHostCpuArchitectureNotMatch            = `host cpu architecture not match`

	ErrUnknown = `unknown error`
)

Here are all the errors that may appear in the preselection predicates.

View Source
const (
	NetworkOwnership = "network_ownership"
	NetworkPrivate   = "network_private"
	NetworkPublic    = "network_public"
	NetworkTypeMatch = "network_type"
	NetworkMatch     = "network_match"
	NetworkWire      = "network_wire"
	NetworkOwner     = "network_owner"
	NetworkDomain    = "network_domain"
	NetworkRange     = "network_range"
	NetworkFreeCount = "network_free_count"
	NetworkPort      = "network_port"

	StorageEnable    = "storage_status"
	StorageMatch     = "storage_match"
	StorageType      = "storage_type"
	StorageOwnership = "storage_ownership"
	StorageMedium    = "storage_medium"
	StorageCapacity  = "storage_capacity"
)

Variables

This section is empty.

Functions

func GetInputSchedtagByType

func GetInputSchedtagByType(tags []*computeapi.SchedtagConfig, types ...string) []*computeapi.SchedtagConfig

func GetRequestSchedtags

func GetRequestSchedtags(reqTags []*computeapi.SchedtagConfig, allTags []schedtag.ISchedtag) (requireTags, execludeTags, preferTags, avoidTags []computeapi.SchedtagConfig)

func GetSchedtagCount

func GetSchedtagCount(inTags []computeapi.SchedtagConfig, objTags []schedtag.ISchedtag, strategy string) (countMap map[string]int)

func IsNetworkAvailable

func IsNetworkAvailable(
	ctx context.Context,
	c core.Candidater, data *api.SchedInfo,
	req *computeapi.NetworkConfig, n *api.CandidateNetwork,
	netTypes []computeapi.TNetworkType, getFreePort func(string) int,
) core.PredicateFailureReason

func IsNetworksAvailable

func IsNetworksAvailable(ctx context.Context, c core.Candidater, data *api.SchedInfo, req *computeapi.NetworkConfig, networks []*api.CandidateNetwork, netTypes []computeapi.TNetworkType, getFreePort func(string) int) (int, []core.PredicateFailureReason)

func NewCloudproviderSchedtagPredicate

func NewCloudproviderSchedtagPredicate() core.FitPredicate

func NewCloudregionSchedtagPredicate

func NewCloudregionSchedtagPredicate() core.FitPredicate

func NewHostSchedtagPredicate

func NewHostSchedtagPredicate() core.FitPredicate

func NewZoneSchedtagPredicate

func NewZoneSchedtagPredicate() core.FitPredicate

func SetCandidateScoreBySchedtag

func SetCandidateScoreBySchedtag(u *core.Unit, c core.Candidater, aggCountMap map[string]int, prefer bool)

Types

type BasePredicate

type BasePredicate struct{}

BasePredicate is a default struct for all the predicates that will include it and implement it's Name() and PreExecute() methods.

func (*BasePredicate) GetHypervisorDriver

func (b *BasePredicate) GetHypervisorDriver(u *core.Unit) models.IGuestDriver

func (*BasePredicate) Name

func (b *BasePredicate) Name() string

func (*BasePredicate) PreExecute

func (b *BasePredicate) PreExecute(ctx context.Context, unit *core.Unit, candis []core.Candidater) (bool, error)

type BaseSchedtagPredicate

type BaseSchedtagPredicate struct {
	BasePredicate
	plugin.BasePlugin

	CandidateInputResources *CandidateInputResourcesMap

	Hypervisor string
	Provider   string
}

Schedtag Description require: Must be scheduled to the specified tag resource prefer: Priority to the specified resource avoid: Try to avoid scheduling to the specified resource exclude: Do not allow scheduling on the specified resource

func NewBaseSchedtagPredicate

func NewBaseSchedtagPredicate() *BaseSchedtagPredicate

func (*BaseSchedtagPredicate) Execute

func (*BaseSchedtagPredicate) GetHypervisorDriver

func (p *BaseSchedtagPredicate) GetHypervisorDriver() models.IGuestDriver

func (*BaseSchedtagPredicate) GetInputResourcesMap

func (p *BaseSchedtagPredicate) GetInputResourcesMap(candidateId string) SchedtagInputResourcesMap

func (*BaseSchedtagPredicate) OnPriorityEnd

func (*BaseSchedtagPredicate) OnSelectEnd

func (*BaseSchedtagPredicate) PreExecute

type CandidateInputResourcesMap

type CandidateInputResourcesMap struct {
	*sync.Map // map[string]SchedtagInputResourcesMap
}

type ClassMetadataPredicate

type ClassMetadataPredicate struct {
	BasePredicate
	// contains filtered or unexported fields
}

func (*ClassMetadataPredicate) Clone

func (*ClassMetadataPredicate) Execute

func (*ClassMetadataPredicate) Name

func (p *ClassMetadataPredicate) Name() string

func (*ClassMetadataPredicate) PreExecute

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

type CloudproviderSchedtagPredicate

type CloudproviderSchedtagPredicate struct {
	*ServerBaseSchedtagPredicate
}

func (*CloudproviderSchedtagPredicate) Clone

func (*CloudproviderSchedtagPredicate) GetCandidateResource

func (*CloudproviderSchedtagPredicate) GetInputs

func (*CloudproviderSchedtagPredicate) Name

func (*CloudproviderSchedtagPredicate) PreExecute

type CloudregionSchedtagPredicate

type CloudregionSchedtagPredicate struct {
	*ServerBaseSchedtagPredicate
}

func (*CloudregionSchedtagPredicate) Clone

func (*CloudregionSchedtagPredicate) GetCandidateResource

func (*CloudregionSchedtagPredicate) GetInputs

func (*CloudregionSchedtagPredicate) Name

type DiskSchedtagPredicate

type DiskSchedtagPredicate struct {
	*BaseSchedtagPredicate
	// contains filtered or unexported fields
}

func (*DiskSchedtagPredicate) AddSelectResult

func (p *DiskSchedtagPredicate) AddSelectResult(index int, input ISchedtagCustomer, selectRes []ISchedtagCandidateResource, output *core.AllocatedResource)

func (*DiskSchedtagPredicate) Clone

func (*DiskSchedtagPredicate) DoSelect

func (*DiskSchedtagPredicate) Execute

func (*DiskSchedtagPredicate) GetCandidateResourceSortScore

func (p *DiskSchedtagPredicate) GetCandidateResourceSortScore(selectRes ISchedtagCandidateResource) int64

func (*DiskSchedtagPredicate) GetInputs

func (p *DiskSchedtagPredicate) GetInputs(u *core.Unit) []ISchedtagCustomer

func (*DiskSchedtagPredicate) GetResources

func (*DiskSchedtagPredicate) GetUsedStorages

func (*DiskSchedtagPredicate) IsResourceMatchInput

func (p *DiskSchedtagPredicate) IsResourceMatchInput(ctx context.Context, input ISchedtagCustomer, res ISchedtagCandidateResource) bool

func (*DiskSchedtagPredicate) Name

func (p *DiskSchedtagPredicate) Name() string

func (*DiskSchedtagPredicate) OnPriorityEnd

func (p *DiskSchedtagPredicate) OnPriorityEnd(u *core.Unit, c core.Candidater)

func (*DiskSchedtagPredicate) OnSelectEnd

func (p *DiskSchedtagPredicate) OnSelectEnd(u *core.Unit, c core.Candidater, count int64)

func (*DiskSchedtagPredicate) PreExecute

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

type DomainPredicate

type DomainPredicate struct {
	BasePredicate
}

func (*DomainPredicate) Clone

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

func (*DomainPredicate) Execute

func (*DomainPredicate) Name

func (p *DomainPredicate) Name() string

type FailReason

type FailReason struct {
	Reason string
	Type   string
}

func (FailReason) GetReason

func (r FailReason) GetReason() string

func (FailReason) GetType

func (r FailReason) GetType() string

type HostSchedtagPredicate

type HostSchedtagPredicate struct {
	*ServerBaseSchedtagPredicate
}

func (*HostSchedtagPredicate) Clone

func (*HostSchedtagPredicate) GetCandidateResource

func (*HostSchedtagPredicate) GetInputs

func (p *HostSchedtagPredicate) GetInputs(u *core.Unit) []ISchedtagCustomer

func (*HostSchedtagPredicate) Name

func (p *HostSchedtagPredicate) Name() string

type INetworkNicCountGetter

type INetworkNicCountGetter interface {
	GetTotalNicCount([]string) (map[string]int, error)
}

type ISchedtagCandidate

type ISchedtagCandidate interface {
	GetId() string
	IndexKey() string
	ResourceType() string
	// GetSchedtags return schedtags bind to this candidate
	GetSchedtags() []schedtag.ISchedtag
	// GetDynamicSchedDesc return schedule description used by dynamic schedtags condition eval
	GetDynamicSchedDesc() *jsonutils.JSONDict
}

type ISchedtagCandidateResource

type ISchedtagCandidateResource interface {
	GetName() string
	GetId() string
	Keyword() string
	// GetSchedtags() []models.SSchedtag
	GetSchedtagJointManager() models.ISchedtagJointManager
	GetDynamicConditionInput() *jsonutils.JSONDict
}

type ISchedtagCustomer

type ISchedtagCustomer interface {
	// JSON(interface{}) *jsonutils.JSONDict
	GetDynamicConditionInput() *jsonutils.JSONDict
	Keyword() string
	IsSpecifyResource() bool
	GetSchedtags() []*computeapi.SchedtagConfig
	ResourceKeyword() string
}

type ISchedtagPredicate

type ISchedtagPredicate interface {
	GetExcludeTags() []computeapi.SchedtagConfig
	GetRequireTags() []computeapi.SchedtagConfig
	GetAvoidTags() []computeapi.SchedtagConfig
	GetPreferTags() []computeapi.SchedtagConfig
}

type ISchedtagPredicateInstance

type ISchedtagPredicateInstance interface {
	core.FitPredicate
	OnPriorityEnd(u *core.Unit, c core.Candidater)
	OnSelectEnd(u *core.Unit, c core.Candidater, count int64)

	GetInputs(u *core.Unit) []ISchedtagCustomer
	GetResources(c core.Candidater) []ISchedtagCandidateResource
	IsResourceMatchInput(ctx context.Context, input ISchedtagCustomer, res ISchedtagCandidateResource) bool
	IsResourceFitInput(ctx context.Context, unit *core.Unit, c core.Candidater, res ISchedtagCandidateResource, input ISchedtagCustomer) core.PredicateFailureReason

	DoSelect(c core.Candidater, input ISchedtagCustomer, res []ISchedtagCandidateResource) []ISchedtagCandidateResource
	AddSelectResult(index int, input ISchedtagCustomer, selectRes []ISchedtagCandidateResource, output *core.AllocatedResource)
	GetCandidateResourceSortScore(candidate ISchedtagCandidateResource) int64
}

type InstanceTypePredicate

type InstanceTypePredicate struct {
	BasePredicate
}

func (*InstanceTypePredicate) Clone

func (*InstanceTypePredicate) Execute

func (*InstanceTypePredicate) Name

func (p *InstanceTypePredicate) Name() string

func (*InstanceTypePredicate) PreExecute

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

type InsufficientResourceError

type InsufficientResourceError struct {
	// resourceName is the name of the resource that is insufficient
	ResourceName string
	// contains filtered or unexported fields
}

InsufficientResourceError is an error type that indicates what kind of resource limit is hit and caused the unfitting failure.

func NewInsufficientResourceError

func NewInsufficientResourceError(resourceName string, requested, total, free int64) *InsufficientResourceError

func (*InsufficientResourceError) Error

func (ire *InsufficientResourceError) Error() string

func (*InsufficientResourceError) GetReason

func (ire *InsufficientResourceError) GetReason() string

type IsolatedDevicePredicate

type IsolatedDevicePredicate struct {
	BasePredicate
}

IsolatedDevicePredicate check mode, and number of scheduled device configurations and current resources.

func (*IsolatedDevicePredicate) Clone

func (*IsolatedDevicePredicate) Execute

func (*IsolatedDevicePredicate) Name

func (f *IsolatedDevicePredicate) Name() string

func (*IsolatedDevicePredicate) PreExecute

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

type NetworkPredicate

type NetworkPredicate struct {
	BasePredicate
	plugin.BasePlugin
	NetworkNicCountGetter INetworkNicCountGetter
	// contains filtered or unexported fields
}

NetworkPredicate will filter the current network information with the specified scheduling information to match, if not specified will randomly match the available network resources.

func NewNetworkPredicate

func NewNetworkPredicate() *NetworkPredicate

func NewNetworkPredicateWithNicCounter

func NewNetworkPredicateWithNicCounter() *NetworkPredicate

func (*NetworkPredicate) Clone

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

func (*NetworkPredicate) Execute

func (*NetworkPredicate) GetNetworkTypes

func (p *NetworkPredicate) GetNetworkTypes(u *core.Unit, specifyType computeapi.TNetworkType) []computeapi.TNetworkType

func (*NetworkPredicate) Name

func (p *NetworkPredicate) Name() string

func (*NetworkPredicate) PreExecute

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

func (*NetworkPredicate) WithNetworkCountGetter

func (p *NetworkPredicate) WithNetworkCountGetter(getter INetworkNicCountGetter) *NetworkPredicate

type NetworkSchedtagPredicate

type NetworkSchedtagPredicate struct {
	*BaseSchedtagPredicate
}

func (*NetworkSchedtagPredicate) AddSelectResult

func (p *NetworkSchedtagPredicate) AddSelectResult(index int, input ISchedtagCustomer, selectRes []ISchedtagCandidateResource, output *core.AllocatedResource)

func (*NetworkSchedtagPredicate) Clone

func (*NetworkSchedtagPredicate) DoSelect

func (*NetworkSchedtagPredicate) Execute

func (*NetworkSchedtagPredicate) GetCandidateResourceSortScore

func (p *NetworkSchedtagPredicate) GetCandidateResourceSortScore(selectRes ISchedtagCandidateResource) int64

func (*NetworkSchedtagPredicate) GetInputs

func (*NetworkSchedtagPredicate) GetNetworkTypes

func (p *NetworkSchedtagPredicate) GetNetworkTypes(specifyType computeapi.TNetworkType) []computeapi.TNetworkType

func (*NetworkSchedtagPredicate) GetResources

func (*NetworkSchedtagPredicate) IsResourceFitInput

func (*NetworkSchedtagPredicate) IsResourceMatchInput

func (*NetworkSchedtagPredicate) Name

func (p *NetworkSchedtagPredicate) Name() string

func (*NetworkSchedtagPredicate) OnPriorityEnd

func (p *NetworkSchedtagPredicate) OnPriorityEnd(u *core.Unit, c core.Candidater)

func (*NetworkSchedtagPredicate) OnSelectEnd

func (p *NetworkSchedtagPredicate) OnSelectEnd(u *core.Unit, c core.Candidater, count int64)

func (*NetworkSchedtagPredicate) PreExecute

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

type PredicateHelper

type PredicateHelper struct {
	Unit      *core.Unit
	Candidate core.Candidater
	// contains filtered or unexported fields
}

func NewPredicateHelper

func NewPredicateHelper(pre core.FitPredicate, unit *core.Unit, candi core.Candidater) *PredicateHelper

func (*PredicateHelper) AppendInsufficientResourceError

func (h *PredicateHelper) AppendInsufficientResourceError(req, total, free int64)

func (*PredicateHelper) AppendPredicateFail

func (h *PredicateHelper) AppendPredicateFail(reason core.PredicateFailureReason)

func (*PredicateHelper) AppendPredicateFailMsg

func (h *PredicateHelper) AppendPredicateFailMsg(reason string)

func (*PredicateHelper) AppendPredicateFailMsgWithType

func (h *PredicateHelper) AppendPredicateFailMsgWithType(reason string, eType string)

func (*PredicateHelper) Exclude

func (h *PredicateHelper) Exclude(reason string)

func (*PredicateHelper) Exclude2

func (h *PredicateHelper) Exclude2(predicateName string, current, expected interface{})

func (*PredicateHelper) ExcludeByErrors

func (h *PredicateHelper) ExcludeByErrors(errs []core.PredicateFailureReason)

func (*PredicateHelper) GetFailedResult

func (h *PredicateHelper) GetFailedResult(err error) (bool, []core.PredicateFailureReason, error)

func (*PredicateHelper) GetResult

func (h *PredicateHelper) GetResult() (bool, []core.PredicateFailureReason, error)

func (*PredicateHelper) SetCapacity

func (h *PredicateHelper) SetCapacity(capacity int64)

SetCapacity returns the current resource capacity calculated by a filter. And 'capacity' default is -1.

func (*PredicateHelper) SetCapacityCounter

func (h *PredicateHelper) SetCapacityCounter(counter core.Counter)

func (*PredicateHelper) SetSelectPriority

func (h *PredicateHelper) SetSelectPriority(sp int)

func (*PredicateHelper) UseReserved

func (h *PredicateHelper) UseReserved() bool

UseReserved check whether the unit can use guest reserved resource

type PredicatedSchedtagResource

type PredicatedSchedtagResource struct {
	ISchedtagCandidateResource
	PreferTags []computeapi.SchedtagConfig
	AvoidTags  []computeapi.SchedtagConfig
}

type ResourceTypePredicate

type ResourceTypePredicate struct {
	BasePredicate
}

func (*ResourceTypePredicate) Clone

func (*ResourceTypePredicate) Execute

func (*ResourceTypePredicate) Name

func (p *ResourceTypePredicate) Name() string

func (*ResourceTypePredicate) PreExecute

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

type ResourceWithClassMetadata

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

func (*ResourceWithClassMetadata) GetAllClassMetadata

func (rcm *ResourceWithClassMetadata) GetAllClassMetadata() (map[string]string, error)

func (*ResourceWithClassMetadata) GetDescription

func (rcm *ResourceWithClassMetadata) GetDescription() string

type SQuotaPredicate

type SQuotaPredicate struct {
	BasePredicate
}

func (*SQuotaPredicate) Clone

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

func (*SQuotaPredicate) Execute

func (*SQuotaPredicate) Name

func (p *SQuotaPredicate) Name() string

func (*SQuotaPredicate) PreExecute

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

type SchedtagChecker

type SchedtagChecker struct {
}

func (*SchedtagChecker) Check

func (*SchedtagChecker) Contains

func (*SchedtagChecker) GetCandidateSchedtags

func (c *SchedtagChecker) GetCandidateSchedtags(candidate ISchedtagCandidate) ([]schedtag.ISchedtag, error)

func (*SchedtagChecker) HasIntersection

func (c *SchedtagChecker) HasIntersection(tags []computeapi.SchedtagConfig, objTags []schedtag.ISchedtag) (bool, schedtag.ISchedtag)

type SchedtagInputResourcesMap

type SchedtagInputResourcesMap map[int][]*PredicatedSchedtagResource

func (SchedtagInputResourcesMap) GetAvoidTags

func (SchedtagInputResourcesMap) GetPreferTags

type SchedtagPredicate

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

func NewSchedtagPredicate

func NewSchedtagPredicate(reqTags []*computeapi.SchedtagConfig, allTags []schedtag.ISchedtag) *SchedtagPredicate

func (*SchedtagPredicate) Check

func (p *SchedtagPredicate) Check(candidate ISchedtagCandidate) error

func (*SchedtagPredicate) GetAvoidTags

func (p *SchedtagPredicate) GetAvoidTags() []computeapi.SchedtagConfig

func (*SchedtagPredicate) GetExcludeTags

func (p *SchedtagPredicate) GetExcludeTags() []computeapi.SchedtagConfig

func (*SchedtagPredicate) GetPreferTags

func (p *SchedtagPredicate) GetPreferTags() []computeapi.SchedtagConfig

func (*SchedtagPredicate) GetRequireTags

func (p *SchedtagPredicate) GetRequireTags() []computeapi.SchedtagConfig

type SchedtagResourceW

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

func (SchedtagResourceW) GetDynamicSchedDesc

func (w SchedtagResourceW) GetDynamicSchedDesc() *jsonutils.JSONDict

func (SchedtagResourceW) GetId

func (w SchedtagResourceW) GetId() string

func (SchedtagResourceW) GetSchedtags

func (w SchedtagResourceW) GetSchedtags() []schedtag.ISchedtag

func (SchedtagResourceW) IndexKey

func (w SchedtagResourceW) IndexKey() string

func (SchedtagResourceW) ResourceType

func (w SchedtagResourceW) ResourceType() string

type ServerBaseSchedtagPredicate

type ServerBaseSchedtagPredicate struct {
	*BaseSchedtagPredicate
	// contains filtered or unexported fields
}

func NewServerBaseSchedtagPredicate

func NewServerBaseSchedtagPredicate(filter iServerBaseSchedtagPredicate) *ServerBaseSchedtagPredicate

func (*ServerBaseSchedtagPredicate) AddSelectResult

func (p *ServerBaseSchedtagPredicate) AddSelectResult(index int, input ISchedtagCustomer, selectRes []ISchedtagCandidateResource, output *core.AllocatedResource)

func (*ServerBaseSchedtagPredicate) DoSelect

func (*ServerBaseSchedtagPredicate) Execute

func (*ServerBaseSchedtagPredicate) GetCandidateResourceSortScore

func (p *ServerBaseSchedtagPredicate) GetCandidateResourceSortScore(selectRes ISchedtagCandidateResource) int64

func (*ServerBaseSchedtagPredicate) GetResources

func (*ServerBaseSchedtagPredicate) IsResourceFitInput

func (*ServerBaseSchedtagPredicate) IsResourceMatchInput

func (*ServerBaseSchedtagPredicate) OnPriorityEnd

func (p *ServerBaseSchedtagPredicate) OnPriorityEnd(u *core.Unit, c core.Candidater)

func (*ServerBaseSchedtagPredicate) OnSelectEnd

func (p *ServerBaseSchedtagPredicate) OnSelectEnd(u *core.Unit, c core.Candidater, count int64)

func (*ServerBaseSchedtagPredicate) PreExecute

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

type SortNetworks

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

func (*SortNetworks) Len

func (ns *SortNetworks) Len() int

func (*SortNetworks) Less

func (ns *SortNetworks) Less(i, j int) bool

func (*SortNetworks) Results

func (ns *SortNetworks) Results() []ISchedtagCandidateResource

func (*SortNetworks) Swap

func (ns *SortNetworks) Swap(i, j int)

type UnexceptedResourceError

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

func Error

func Error(message string) *UnexceptedResourceError

func NewUnexceptedResourceError

func NewUnexceptedResourceError(message string) *UnexceptedResourceError

func (*UnexceptedResourceError) Error

func (ure *UnexceptedResourceError) Error() string

func (*UnexceptedResourceError) GetReason

func (ure *UnexceptedResourceError) GetReason() string

type ZoneSchedtagPredicate

type ZoneSchedtagPredicate struct {
	*ServerBaseSchedtagPredicate
}

func (*ZoneSchedtagPredicate) Clone

func (*ZoneSchedtagPredicate) GetCandidateResource

func (*ZoneSchedtagPredicate) GetInputs

func (p *ZoneSchedtagPredicate) GetInputs(u *core.Unit) []ISchedtagCustomer

func (*ZoneSchedtagPredicate) Name

func (p *ZoneSchedtagPredicate) Name() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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