inject

package
v0.6.4-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const AmdUrl = "devpod-linux-amd64"
View Source
const ArmUrl = "devpod-linux-arm64"
View Source
const BinNamePlaceholder = "${BIN_NAME}"

Variables

View Source
var Script string

Functions

func GenerateScript added in v0.4.0

func GenerateScript(script string, params *Params) (string, error)

func InjectAndExecute

func InjectAndExecute(
	ctx context.Context,
	exec ExecFunc,
	localFile LocalFile,
	scriptParams *Params,
	stdin io.Reader,
	stdout io.Writer,
	stderr io.Writer,
	timeout time.Duration,
	log log.Logger,
) (bool, error)

Types

type DownloadURLs added in v0.4.0

type DownloadURLs struct {
	Base string
	Amd  string
	Arm  string
}

func NewDownloadURLs added in v0.4.0

func NewDownloadURLs(baseUrl string) *DownloadURLs

type ExecFunc

type ExecFunc func(ctx context.Context, command string, stdin io.Reader, stdout io.Writer, stderr io.Writer) error

type LocalFile

type LocalFile func(arm bool) (io.ReadCloser, error)

type Params added in v0.4.0

type Params struct {
	Command         string
	AgentRemotePath string
	DownloadURLs    *DownloadURLs

	ExistsCheck         string
	PreferAgentDownload bool
	ShouldChmodPath     bool
}

func (*Params) ChmodPath added in v0.4.0

func (p *Params) ChmodPath() string

func (*Params) InstallDir added in v0.4.0

func (p *Params) InstallDir() string

func (*Params) InstallFilename added in v0.4.0

func (p *Params) InstallFilename() string

func (*Params) PreferDownload added in v0.4.0

func (p *Params) PreferDownload() string

Jump to

Keyboard shortcuts

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