source_file
comment "/*\nCopyright 2014 The Kubernetes Authors.\n\nLicensed under th"...
package_clause
package "package"
package_identifier "scheduler"
import_declaration (+144 nodes collapsed)
const_declaration (+28 nodes collapsed)
comment "// ScheduleOne does the entire scheduling workflow for a sin"...
comment "// It is serialized on the scheduling algorithm's host fitti"...
method_declaration (+284 nodes collapsed)
comment "// scheduleOnePod does the entire scheduling workflow for a "...
method_declaration (+471 nodes collapsed)
comment "// runBindingCycle runs a binding cycle algorithm."
method_declaration (+203 nodes collapsed)
var_declaration (+34 nodes collapsed)
comment "// schedulingCycle tries to schedule a single Pod."
method_declaration (+268 nodes collapsed)
comment "// prepareForBindingCycle applies the schedule result, gener"...
comment "// preparing for a binding cycle."
method_declaration
func "func"
parameter_list
( "("
parameter_declaration
identifier "sched"
pointer_type
* "*"
type_identifier "Scheduler"
) ")"
field_identifier "prepareForBindingCycle"
parameter_list (+46 nodes collapsed)
parameter_list
( "("
parameter_declaration
pointer_type
* "*"
qualified_type
package_identifier "framework"
. "."
type_identifier "QueuedPodInfo"
, ","
parameter_declaration
pointer_type
* "*"
qualified_type
package_identifier "fwk"
. "."
type_identifier "Status"
) ")"
block
{ "{"
statement_list
short_var_declaration (+24 nodes collapsed)
if_statement (+22 nodes collapsed)
short_var_declaration
expression_list
identifier "assumedPod"
:= ":="
expression_list
selector_expression
identifier "assumedPodInfo"
. "."
field_identifier "Pod"
comment "// Run \"permit\" plugins."
short_var_declaration
expression_list
identifier "runPermitStatus"
:= ":="
expression_list
call_expression
selector_expression
identifier "schedFramework"
. "."
field_identifier "RunPermitPlugins"
argument_list
( "("
identifier "ctx"
, ","
identifier "state"
, ","
identifier "assumedPod"
, ","
selector_expression
identifier "scheduleResult"
. "."
field_identifier "SuggestedHost"
) ")"
if_statement
if "if"
binary_expression
unary_expression
! "!"
call_expression
selector_expression
identifier "runPermitStatus"
. "."
field_identifier "IsWait"
argument_list
( "("
) ")"
&& "&&"
unary_expression
! "!"
call_expression
selector_expression
identifier "runPermitStatus"
. "."
field_identifier "IsSuccess"
argument_list
( "("
) ")"
block (+200 nodes collapsed)
comment "// At the end of a successful scheduling cycle, pop and move"...
if_statement (+75 nodes collapsed)
return_statement
return "return"
expression_list
identifier "assumedPodInfo"
, ","
nil "nil"
} "}"
comment "// schedulingAlgorithm runs fitering and scoring phases for "...
comment "// together with post filter when the pod is unschedulable."
method_declaration (+598 nodes collapsed)
comment "// assumeAndReserve assumes and reserves the pod in schedule"...
method_declaration (+402 nodes collapsed)
comment "// unreserveAndForget unreserves and forgets the pod from sc"...
comment "// This function shouldn't be called during binding cycle wi"...
comment "// but this shouldn't happen, because such pods cannot reach"...
method_declaration (+254 nodes collapsed)
comment "// bindingCycle tries to bind an assumed Pod."
method_declaration (+1065 nodes collapsed)
method_declaration (+273 nodes collapsed)
method_declaration (+98 nodes collapsed)
comment "// skipPodSchedule returns true if we could skip scheduling "...
method_declaration (+224 nodes collapsed)
comment "// schedulePod tries to schedule the given pod to one of the"...
comment "// If it succeeds, it will return the name of the node."
comment "// If it fails, it will return a FitError with reasons."
method_declaration (+612 nodes collapsed)
comment "// Filters the nodes to find the ones that fit the pod based"...
comment "// filter plugins and filter extenders."
method_declaration (+962 nodes collapsed)
method_declaration (+253 nodes collapsed)
comment "// hasScoring checks if scoring nodes is configured."
method_declaration (+82 nodes collapsed)
comment "// hasExtenderFilters checks if any extenders filter nodes."
method_declaration (+58 nodes collapsed)
comment "// findNodesThatPassFilters finds the nodes that fit the fil"...
method_declaration (+830 nodes collapsed)
comment "// numFeasibleNodesToFind returns the number of feasible nod"...
comment "// its search for more feasible nodes."
method_declaration (+158 nodes collapsed)
function_declaration (+335 nodes collapsed)
comment "// prioritizeNodes prioritizes the nodes by running the scor"...
comment "// which return a score for each node from the call to RunSc"...
comment "// The scores from each plugin are added together to make th"...
comment "// any extenders are run as well."
comment "// All scores are finally combined (added) to get the total "...
function_declaration (+1248 nodes collapsed)
type_declaration
type "type"
type_spec
type_identifier "sortedNodeScores"
struct_type
struct "struct"
field_declaration_list
{ "{"
field_declaration
field_identifier "nodes"
type_identifier "nodeScoreHeap"
} "}"
function_declaration (+58 nodes collapsed)
method_declaration (+53 nodes collapsed)
comment "// Used only for unit tests."
method_declaration (+53 nodes collapsed)
method_declaration (+33 nodes collapsed)
comment "// nodeScoreHeap is a heap of fwk.NodePluginScores."
type_declaration
type "type"
type_spec
type_identifier "nodeScoreHeap"
slice_type
[ "["
] "]"
qualified_type
package_identifier "fwk"
. "."
type_identifier "NodePluginScores"
comment "// nodeScoreHeap implements heap.Interface."
var_declaration
var "var"
var_spec
identifier "_"
qualified_type
package_identifier "heap"
. "."
type_identifier "Interface"
= "="
expression_list
unary_expression
& "&"
composite_literal
type_identifier "nodeScoreHeap"
literal_value
{ "{"
} "}"
method_declaration (+26 nodes collapsed)
method_declaration (+89 nodes collapsed)
method_declaration (+47 nodes collapsed)
method_declaration (+49 nodes collapsed)
method_declaration (+75 nodes collapsed)
comment "// assume signals to the cache that a pod is already in the "...
comment "// When called during pod group scheduling cycle, pod is ass"...
method_declaration (+207 nodes collapsed)
comment "// bind binds a pod to a given node defined in a binding obj"...
comment "// The precedence for binding is: (1) extenders and (2) fram"...
comment "// We expect this to run asynchronously, so we handle bindin"...
method_declaration (+166 nodes collapsed)
comment "// TODO(#87159): Move this to a Plugin."
method_declaration (+250 nodes collapsed)
method_declaration (+158 nodes collapsed)
function_declaration (+56 nodes collapsed)
comment "// handleSchedulingFailure records an event for the pod that"...
comment "// pod has failed to schedule. Also, update the pod conditio"...
method_declaration (+1073 nodes collapsed)
comment "// truncateMessage truncates a message if it hits the NoteLe"...
function_declaration (+71 nodes collapsed)
function_declaration (+401 nodes collapsed)