Documentation ¶
Index ¶
- Constants
- func ErrorToFrameworkStatus(err error) *framework.Status
- func PredicateMetadata(state *framework.CycleState) interface{}
- func PredicateResultToFrameworkStatus(reasons []predicates.PredicateFailureReason, err error) *framework.Status
- func PriorityMetadata(state *framework.CycleState) interface{}
- type PredicatesStateData
- type PrioritiesStateData
Constants ¶
const ( // PredicatesStateKey is the key in CycleState to PredicateStateData PredicatesStateKey = "predicates" // PrioritiesStateKey is the key in CycleState to PrioritiesStateData PrioritiesStateKey = "priorities" )
Variables ¶
This section is empty.
Functions ¶
func ErrorToFrameworkStatus ¶
ErrorToFrameworkStatus converts an error to a framework status.
func PredicateMetadata ¶
func PredicateMetadata(state *framework.CycleState) interface{}
PredicateMetadata returns predicate metadata stored in CycleState.
func PredicateResultToFrameworkStatus ¶
func PredicateResultToFrameworkStatus(reasons []predicates.PredicateFailureReason, err error) *framework.Status
PredicateResultToFrameworkStatus converts a predicate result (PredicateFailureReason + error) to a framework status.
func PriorityMetadata ¶
func PriorityMetadata(state *framework.CycleState) interface{}
PriorityMetadata returns priority metadata stored in CycleState.
Types ¶
type PredicatesStateData ¶
type PredicatesStateData struct {
Reference interface{}
}
PredicatesStateData is a pointer to Metadata. In the normal case, StateData is supposed to be generated and stored in CycleState by a framework plugin (like a PreFilter pre-computing data for its corresponding Filter). However, during migration, the scheduler will inject a pointer to Metadata into CycleState. This "hack" is necessary because during migration Filters that implement predicates functionality will be calling into the existing predicate functions, and need to pass Metadata.
func (*PredicatesStateData) Clone ¶
func (p *PredicatesStateData) Clone() framework.StateData
Clone is supposed to make a copy of the data, but since this is just a pointer, we are practically just copying the pointer. This is ok because the actual reference to the Metadata copy that is made by generic_scheduler during preemption cycle will be injected again outside the framework.
type PrioritiesStateData ¶
type PrioritiesStateData struct {
Reference interface{}
}
PrioritiesStateData is a pointer to PrioritiesMetadata.
func (*PrioritiesStateData) Clone ¶
func (p *PrioritiesStateData) Clone() framework.StateData
Clone is supposed to make a copy of the data, but since this is just a pointer, we are practically just copying the pointer.