inject

package
v0.8.12 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 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

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

type DownloadURLs struct {
	Base string
	Amd  string
	Arm  string
}

func NewDownloadURLs

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

type Params struct {
	Command         string
	AgentRemotePath string
	DownloadURLs    *DownloadURLs

	ExistsCheck         string
	PreferAgentDownload bool
	ShouldChmodPath     bool
}

func (*Params) ChmodPath

func (p *Params) ChmodPath() string

func (*Params) InstallDir

func (p *Params) InstallDir() string

func (*Params) InstallFilename

func (p *Params) InstallFilename() string

func (*Params) PreferDownload

func (p *Params) PreferDownload() string

Jump to

Keyboard shortcuts

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