kops/upup/pkg/fi/task.go

17 lines
397 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))
}