Documentation
¶
Overview ¶
Package packages contains the install/upgrades/uninstall logic for packages
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // AsyncPreRemoveHooks is called before a package is removed from the disk. // It can block the removal of the package files until a condition is met without blocking // the rest of the uninstall or upgrade process. // Today this is only useful for the dotnet tracer on windows and generally *SHOULD BE AVOIDED*. AsyncPreRemoveHooks = map[string]repository.PreRemoveHook{} )
Functions ¶
func InstrumentAPMInjector ¶
InstrumentAPMInjector instruments the APM injector
func RunHook ¶ added in v0.66.0
func RunHook(ctx HookContext) (err error)
RunHook executes a hook for a package
Types ¶
type HookContext ¶ added in v0.66.0
type HookContext struct {
context.Context `json:"-"`
Package string `json:"package"`
PackageType PackageType `json:"package_type"`
PackagePath string `json:"package_path"`
Hook string `json:"hook"`
Upgrade bool `json:"upgrade"`
WindowsArgs []string `json:"windows_args"`
}
HookContext is the context passed to hooks during install/upgrade/uninstall.
func (HookContext) StartSpan ¶ added in v0.66.0
func (c HookContext) StartSpan(operationName string) (*telemetry.Span, HookContext)
StartSpan starts a new span with the given operation name.
type Hooks ¶ added in v0.66.0
type Hooks interface {
PreInstall(ctx context.Context, pkg string, pkgType PackageType, upgrade bool) error
PreRemove(ctx context.Context, pkg string, pkgType PackageType, upgrade bool) error
PostInstall(ctx context.Context, pkg string, pkgType PackageType, upgrade bool, winArgs []string) error
PreStartExperiment(ctx context.Context, pkg string) error
PostStartExperiment(ctx context.Context, pkg string) error
PreStopExperiment(ctx context.Context, pkg string) error
PostStopExperiment(ctx context.Context, pkg string) error
PrePromoteExperiment(ctx context.Context, pkg string) error
PostPromoteExperiment(ctx context.Context, pkg string) error
}
Hooks is the interface for the hooks.
func NewHooks ¶ added in v0.66.0
func NewHooks(env *env.Env, packages *repository.Repositories) Hooks
NewHooks creates a new Hooks instance that will execute hooks via the CLI.
type PackageType ¶ added in v0.66.0
type PackageType string
PackageType is the type of package.
const ( // PackageTypeOCI is the type for OCI packages. PackageTypeOCI PackageType = "oci" // PackageTypeDEB is the type for DEB packages. PackageTypeDEB PackageType = "deb" // PackageTypeRPM is the type for RPM packages. PackageTypeRPM PackageType = "rpm" )
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package apminject implements the apm injector installer
|
Package apminject implements the apm injector installer |
|
Package embedded provides embedded files for the installer.
|
Package embedded provides embedded files for the installer. |
|
Package exec provides wrappers to external executables
|
Package exec provides wrappers to external executables |
|
Package file offers filesystem utils geared towards idempotent operations.
|
Package file offers filesystem utils geared towards idempotent operations. |
|
Package integrations contains packaging logic for python integrations
|
Package integrations contains packaging logic for python integrations |
|
Package packagemanager provides an interface over the OS package manager
|
Package packagemanager provides an interface over the OS package manager |
|
Package selinux offers an interface to set agent's SELinux permissions.
|
Package selinux offers an interface to set agent's SELinux permissions. |
|
Package service provides service manager utilities
|
Package service provides service manager utilities |
|
systemd
Package systemd provides a set of functions to manage systemd units
|
Package systemd provides a set of functions to manage systemd units |
|
sysvinit
Package sysvinit provides a set of functions to manage sysvinit services
|
Package sysvinit provides a set of functions to manage sysvinit services |
|
upstart
Package upstart provides a set of functions to manage upstart services
|
Package upstart provides a set of functions to manage upstart services |
|
Package user offers an interface over user and group management
|
Package user offers an interface over user and group management |
Click to show internal directories.
Click to hide internal directories.