Merge pull request #78292 from JieJhih/scheduling/code

use iota instead assign value to constants
k3s-v1.15.3
Kubernetes Prow Robot 2019-05-27 05:03:53 -07:00 committed by GitHub
commit f780ac028b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -34,14 +34,14 @@ type Code int
const ( const (
// Success means that plugin ran correctly and found pod schedulable. // Success means that plugin ran correctly and found pod schedulable.
// NOTE: A nil status is also considered as "Success". // NOTE: A nil status is also considered as "Success".
Success Code = 0 Success Code = iota
// Error is used for internal plugin errors, unexpected input, etc. // Error is used for internal plugin errors, unexpected input, etc.
Error Code = 1 Error
// Unschedulable is used when a plugin finds a pod unschedulable. // Unschedulable is used when a plugin finds a pod unschedulable.
// The accompanying status message should explain why the pod is unschedulable. // The accompanying status message should explain why the pod is unschedulable.
Unschedulable Code = 2 Unschedulable
// Wait is used when a permit plugin finds a pod scheduling should wait. // Wait is used when a permit plugin finds a pod scheduling should wait.
Wait Code = 3 Wait
) )
// Status indicates the result of running a plugin. It consists of a code and a // Status indicates the result of running a plugin. It consists of a code and a