...
This commit is contained in:
		| @@ -4,7 +4,7 @@ import ( | ||||
| 	"log" | ||||
| 	"sync" | ||||
|  | ||||
| 	"github.com/freeflowuniverse/heroagent/pkg/handlerfactory/herohandler" | ||||
| 	"github.com/freeflowuniverse/heroagent/pkg/heroscript/handlerfactory/herohandler" | ||||
| ) | ||||
|  | ||||
| func main() { | ||||
|   | ||||
| @@ -2,8 +2,6 @@ package main | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"log" | ||||
| 	"os" | ||||
|  | ||||
| 	"github.com/freeflowuniverse/heroagent/pkg/heroscript/playbook" | ||||
| ) | ||||
| @@ -15,26 +13,26 @@ func main() { | ||||
| 	pb := playbook.New() | ||||
|  | ||||
| 	// Start a simple process | ||||
| 	startAction := pb.NewAction(1, "start", "process", 0, playbook.ActionTypeUnknown) | ||||
| 	startAction := pb.NewAction("1", "start", "process", 0, playbook.ActionTypeUnknown) | ||||
| 	startAction.Params.Set("name", "example_process") | ||||
| 	startAction.Params.Set("command", "ping -c 60 localhost") | ||||
| 	startAction.Params.Set("log", "true") | ||||
|  | ||||
| 	// List all processes | ||||
| 	listAction := pb.NewAction(2, "list", "process", 0, playbook.ActionTypeUnknown) | ||||
| 	listAction := pb.NewAction("2", "list", "process", 0, playbook.ActionTypeUnknown) | ||||
| 	listAction.Params.Set("format", "table") | ||||
|  | ||||
| 	// Get status of a specific process | ||||
| 	statusAction := pb.NewAction(3, "status", "process", 0, playbook.ActionTypeUnknown) | ||||
| 	statusAction := pb.NewAction("3", "status", "process", 0, playbook.ActionTypeUnknown) | ||||
| 	statusAction.Params.Set("name", "example_process") | ||||
|  | ||||
| 	// Get logs of a specific process | ||||
| 	logsAction := pb.NewAction(4, "logs", "process", 0, playbook.ActionTypeUnknown) | ||||
| 	logsAction := pb.NewAction("4", "logs", "process", 0, playbook.ActionTypeUnknown) | ||||
| 	logsAction.Params.Set("name", "example_process") | ||||
| 	logsAction.Params.Set("lines", "10") | ||||
|  | ||||
| 	// Stop a process | ||||
| 	stopAction := pb.NewAction(5, "stop", "process", 0, playbook.ActionTypeUnknown) | ||||
| 	stopAction := pb.NewAction("5", "stop", "process", 0, playbook.ActionTypeUnknown) | ||||
| 	stopAction.Params.Set("name", "example_process") | ||||
|  | ||||
| 	// Generate the heroscript | ||||
|   | ||||
		Reference in New Issue
	
	Block a user