usecase

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendCommandEnvsToTask

func AppendCommandEnvsToTask(cmd *supfile.Command, task *entity.Task)

func CheckInitialArgs

func CheckInitialArgs(network *supfile.Network, initialArgs *entity.InitialArgs)

func CreateTasks

func CreateTasks(cmd *supfile.Command, clients []entity.ClientFacade, env supfile.EnvList, args *entity.InitialArgs) ([]*entity.Task, error)

func EnsureLocalhost

func EnsureLocalhost(supFile *supfile.Supfile)

func FilterNonPrintable added in v0.7.1

func FilterNonPrintable(r io.Reader) (string, error)

@this original 81A0C135-69EA-4736-AFD4-1D132A2DB91E@

func ResolveLocalPath

func ResolveLocalPath(cwd, path, env string) (string, error)

ResolveLocalPath - Use bash to resolve $ENV_VARs. like: `~/dir` or `$HOME/dir`

func ResolvePath

func ResolvePath(path string) string

ResolvePath resolves a path relative to the current working directory

Types

type Stackup

type Stackup struct {
	Args *entity.InitialArgs
	// contains filtered or unexported fields
}

func NewStackup

func NewStackup(conf *supfile.Supfile) *Stackup

NewStackup creates a new Stackup instance.

func (*Stackup) ConnectToBastionHostHelper added in v0.7.1

func (sup *Stackup) ConnectToBastionHostHelper(network *supfile.Network) (entity.ClientFacade, error)

Helper function to connect to the bastion host.

func (*Stackup) ConnectToHostsHelper added in v0.7.1

func (sup *Stackup) ConnectToHostsHelper(network *supfile.Network, bastion entity.ClientFacade) ([]entity.ClientFacade, int, []string)

ConnectToHostsHelper is a helper function to connect to all hosts.

func (*Stackup) Debug

func (sup *Stackup) Debug(value bool)

Debug sets whether or not to print debug messages

func (*Stackup) Prefix

func (sup *Stackup) Prefix(value bool)

Prefix sets the host prefix for printing output from it

func (*Stackup) Run

func (sup *Stackup) Run(runOrder entity.RunOrder) error

Run runs set of commands on multiple hosts defined by network sequentially.

TODO: This megamoth method needs a big refactor and should be split
to multiple smaller methods.

func (*Stackup) WrapError added in v0.7.1

func (sup *Stackup) WrapError(traceID, hint string, err error) error

Helper function to wrap errors consistently.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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