script

package
v0.0.0-...-21a93f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 1 Imported by: 20

Documentation

Overview

commander

shell.go defines how a Shell script should be executed on agents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Path string
	Args []string
	Env  []string
}

func (*Command) ToOsExecCommand

func (c *Command) ToOsExecCommand() *exec.Cmd

type Operation

type Operation struct {
	Type string
	Code string
}

type Script

type Script interface {
	Init(code string)
	GetCommand() *Command

	Map(code string)
	ForEach(code string)
	FlatMap(code string)
	Reduce(code string)
	ReduceBy(code string, indexes []int)
	Filter(code string)
	GroupBy(indexes []int)
	Select(indexes []int)
	Limit(n int, offset int)
}

type ShellScript

type ShellScript struct {
	// contains filtered or unexported fields
}

func NewShellScript

func NewShellScript() *ShellScript

func (*ShellScript) GetCommand

func (c *ShellScript) GetCommand() *Command

func (*ShellScript) Init

func (c *ShellScript) Init(code string)

func (*ShellScript) Name

func (c *ShellScript) Name() string

func (*ShellScript) Pipe

func (c *ShellScript) Pipe(code string) *ShellScript

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL