mirror of https://github.com/kubernetes/kops.git
21 lines
466 B
Go
21 lines
466 B
Go
package fi
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
type Task interface {
|
|
Run(*Context) error
|
|
}
|
|
|
|
// TaskAsString renders the task for debug output
|
|
// TODO: Use reflection to make this cleaner: don't recurse into tasks - print their names instead
|
|
// also print resources in a cleaner way (use the resource source information?)
|
|
func TaskAsString(t Task) string {
|
|
return fmt.Sprintf("%T %s", t, DebugAsJsonString(t))
|
|
}
|
|
|
|
type HasCheckExisting interface {
|
|
CheckExisting(c *Context) bool
|
|
}
|