inject

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 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 Inject added in v0.9.1

func Inject(opts InjectOptions) (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 InjectOptions added in v0.9.1

type InjectOptions struct {
	Ctx          context.Context
	Exec         ExecFunc
	LocalFile    LocalFile
	ScriptParams *Params
	Stdin        io.Reader
	Stdout       io.Writer
	Stderr       io.Writer
	Timeout      time.Duration
	Log          log.Logger
}

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