Help us shape the future of Go! Take the 2026 Go Developer Survey

inject

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AmdUrl             = config.BinaryName + "-linux-amd64"
	ArmUrl             = config.BinaryName + "-linux-arm64"
	BinNamePlaceholder = "${BIN_NAME}"
)

Variables

View Source
var Script string

Deprecated: Script embeds inject.sh which is deprecated. Platform-native AgentDelivery implementations (LocalDockerDelivery, RemoteDockerDelivery, KubernetesDelivery) are the replacements.

Functions

func GenerateScript

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

func Inject deprecated

func Inject(opts InjectOptions) (bool, error)

Deprecated: Inject is part of the legacy shell injection path. Platform-native AgentDelivery implementations (LocalDockerDelivery, RemoteDockerDelivery, KubernetesDelivery) are the replacements.

Types

type DownloadURLs

type DownloadURLs struct {
	Base string
	Amd  string
	Arm  string
}

func NewDownloadURLs

func NewDownloadURLs(baseUrl string) *DownloadURLs

type ExecFunc deprecated

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

Deprecated: ExecFunc is part of the legacy shell injection path. Platform-native AgentDelivery implementations (LocalDockerDelivery, RemoteDockerDelivery, KubernetesDelivery) are the replacements.

type InjectOptions deprecated

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

Deprecated: InjectOptions is part of the legacy shell injection path. Platform-native AgentDelivery implementations (LocalDockerDelivery, RemoteDockerDelivery, KubernetesDelivery) are the replacements.

type LocalFile deprecated

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

Deprecated: LocalFile is part of the legacy shell injection path. Platform-native AgentDelivery implementations (LocalDockerDelivery, RemoteDockerDelivery, KubernetesDelivery) are the replacements.

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