Completely rebuild the tree generation logic.

This commit is contained in:
2023-02-21 10:29:42 +00:00
parent e39c93e9ea
commit e037788677
10 changed files with 448 additions and 110 deletions
+26 -2
View File
@@ -1,8 +1,6 @@
package controllers
// +kubebuilder:validation:Enum=Allow;Forbid;Replace
type ExecutionStatus string
const (
ExecutionStatusPending string = "pending"
ExecutionStatusRunning string = "running"
@@ -15,3 +13,29 @@ const (
var (
jobOwnerKey = ".metadata.controller"
)
type (
ExecutionStatus string
tree struct {
text string
items []Tree
}
// Tree is tree interface
Tree interface {
Add(text string) Tree
AddTree(tree Tree)
Items() []Tree
Text() string
Print() string
}
printer struct {
}
// Printer is printer interface
Printer interface {
Print(Tree) string
}
)