mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
use iota instead assign value to constants
This commit is contained in:
parent
4884873160
commit
823111c0fe
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user