installer

package
v0.0.0-...-cba18c7 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package installer provides a package manager that installs and uninstalls packages.

Index

Constants

View Source
const (
	// PackagesPath is the path to the packages directory.
	PackagesPath = "/opt/datadog-packages"
	// TmpDirPath is the path to the temporary directory used for package installation.
	TmpDirPath = "/opt/datadog-packages"
	// LocksPack is the path to the locks directory.
	LocksPack = "/var/run/datadog-packages"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Installer

type Installer interface {
	State(pkg string) (repository.State, error)
	States() (map[string]repository.State, error)

	Install(ctx context.Context, url string) error
	Remove(ctx context.Context, pkg string) error

	InstallExperiment(ctx context.Context, url string) error
	RemoveExperiment(ctx context.Context, pkg string) error
	PromoteExperiment(ctx context.Context, pkg string) error

	GarbageCollect(ctx context.Context) error
}

Installer is a package manager that installs and uninstalls packages.

func NewInstaller

func NewInstaller(opts ...Option) Installer

NewInstaller returns a new Package Manager.

type Option

type Option func(*options)

Option are the options for the package manager.

func WithRegistry

func WithRegistry(registry string) Option

WithRegistry sets the registry URL.

func WithRegistryAuth

func WithRegistryAuth(registryAuth string) Option

WithRegistryAuth sets the registry authentication method.

Directories

Path Synopsis
Package errors contains errors used by the installer.
Package errors contains errors used by the installer.
Package repository contains the packaging logic of the updater.
Package repository contains the packaging logic of the updater.
Package service provides a way to interact with os services
Package service provides a way to interact with os services

Jump to

Keyboard shortcuts

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