exec

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneRepos

func CloneRepos(config *dao.Config, syncProjects []dao.Project, syncFlags core.SyncFlags) error

func PrintProjectInit

func PrintProjectInit(projects []dao.Project)

func PrintProjectStatus

func PrintProjectStatus(config *dao.Config, projects []dao.Project) error

func RunTableCmd

func RunTableCmd(t TableCmd, data dao.TableOutput, dataMutex *sync.RWMutex, wg *sync.WaitGroup) error

func RunTextCmd

func RunTextCmd(t TableCmd, textStyle dao.Text, prefix string, parallel bool, wg *sync.WaitGroup) error

func UpdateGitignoreIfExists

func UpdateGitignoreIfExists(config *dao.Config) error

Types

type Client

type Client struct {
	Name string
	Path string
	Env  []string
	// contains filtered or unexported fields
}

Client is a wrapper over the SSH connection/sessions.

func (*Client) Close

func (c *Client) Close() error

func (*Client) Prefix

func (c *Client) Prefix() string

func (*Client) Run

func (c *Client) Run(shell string, env []string, cmdStr []string) error

func (*Client) Stderr

func (c *Client) Stderr() io.Reader

func (*Client) Stdout

func (c *Client) Stdout() io.Reader

func (*Client) Wait

func (c *Client) Wait() error

type Exec

type Exec struct {
	Clients  []Client
	Projects []dao.Project
	Tasks    []dao.Task
	Config   dao.Config
}

func (*Exec) CheckTaskNoColor

func (e *Exec) CheckTaskNoColor()

func (*Exec) ParseTask

func (exec *Exec) ParseTask(userArgs []string, runFlags *core.RunFlags, setRunFlags *core.SetRunFlags) error

func (*Exec) Run

func (exec *Exec) Run(
	userArgs []string,
	runFlags *core.RunFlags,
	setRunFlags *core.SetRunFlags,
) error

func (*Exec) SetClients

func (exec *Exec) SetClients(
	clientCh chan Client,
	errCh chan error,
) error

func (*Exec) SetCloneClients

func (exec *Exec) SetCloneClients(clientCh chan Client) error

func (*Exec) Table

func (exec *Exec) Table(runFlags *core.RunFlags) dao.TableOutput

func (*Exec) TableWork

func (exec *Exec) TableWork(rIndex int, dryRun bool, data dao.TableOutput, dataMutex *sync.RWMutex) error

func (*Exec) Text

func (exec *Exec) Text(dryRun bool)

func (*Exec) TextWork

func (exec *Exec) TextWork(rIndex int, prefixMaxLen int, dryRun bool) error

type TableCmd

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

Jump to

Keyboard shortcuts

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