package
8.15.2+incompatible
Repository: https://github.com/elastic/elastic-agent.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
AddLicenseHeaders adds license headers to .go files.
AddPlatforms sets dependencies on others platforms.
No description provided by the author
BeatDocBranch returns the documentation branch name associated with the Beat branch.
BeatQualifiedVersion returns the Beat's qualified version.
Build invokes "go build" to produce a binary.
BuildDate returns the time that the build started.
BuildGoDaemon builds the go-daemon binary.
BuildSystemTestBinary runs BuildSystemTestGoBinary with default values.
BuildSystemTestGoBinary build a binary for testing that is instrumented for testing and measuring code coverage.
Check looks for created/modified/deleted/renamed files and returns an error if it finds any modifications.
CheckLicenseHeaders checks license headers in .go files.
This is a helper function for flattenDependencies that's used when building from a manifest.
This is a helper function for flattenDependencies that's used when not packaging from a manifest.
CheckYAMLNotExecutable checks that no .yml or .yaml files are executable.
Clean clean generated build artifacts.
CommitHash returns the full length git commit hash.
CommitHashShort returns the short length git commit hash.
Config generates config files.
Copy copies a file or a directory (recursively) and preserves the permissions.
No description provided by the author
CopyFilesToVendor copies packages which require the whole tree.
CreateDir creates the parent directory for the given file.
CreateSHA512File computes the sha512 sum of the specified file the writes a sidecar file containing the hash and filename.
CrossBuild executes a given build target once for each target platform.
CrossBuildGoDaemon cross-build the go-daemon binary using the golang-crossbuild environment.
CrossBuildImage build the docker image.
CrossBuildXPack executes the 'golangCrossBuild' target in the Beat's associated x-pack directory to produce a version of the Beat that contains Elastic licensed content.
CWD return the current working directory.
DefaultBuildArgs returns the default BuildArgs for use in builds.
DefaultGolangCrossBuildArgs returns the default BuildArgs for use in cross-builds.
DefaultGoTestIntegrationArgs returns a default set of arguments for running all integration tests.
DefaultGoTestUnitArgs returns a default set of arguments for running all unit tests.
DefaultTestBinaryArgs returns the default arguments for building a binary for testing.
DockerChown chowns files generated during build.
DownloadFile downloads the given URL and writes the file to destinationDir.
DumpVariables writes the template variables and values to stdout.
ElasticBeatsDir returns the path to Elastic beats dir.
EnvMap returns map containing the common settings variables and all variables from the environment.
EnvOr returns the value of the specified environment variable if it is non-empty.
Expand expands the given Go text/template string.
ExpandFile expands the Go text/template read from src and writes the output to dst.
Extract extracts .zip, .tar.gz, or .tgz files to destinationDir.
FileConcat concatenates files and writes the output to out.
FindFiles return a list of file matching the given glob patterns.
FindFilesRecursive recursively traverses from the CWD and invokes the given match function on each regular file to determine if the given path should be returned as a match.
FindReplace reads a file, performs a find/replace operation, then writes the output to the same file path.
Format adds license headers, formats .go files with goimports, and formats .py files with autopep8.
ForPlatforms filters the platforms based on the given expression.
No description provided by the author
No description provided by the author
GetAppleSigningInfo returns the signing identities used for code signing apps and installers.
GetDockerInfo returns data from the docker info command.
GetProjectRepoInfo returns information about the repo including the root import path and the current directory's import path.
GetSHA512Hash returns SHA512 hash of file.
GoImports executes goimports against all .go files in and below the CWD.
GolangCrossBuild invokes "go build" inside of the golang-crossbuild Docker environment.
GoTest invokes "go test" and reports the results to stdout.
GoTestIntegrationArgsForModule returns a default set of arguments for running module integration tests.
GoTestIntegrationForModule executes the Go integration tests sequentially.
GoVersion returns the version of Go defined in the project's .go-version file.
GoVet vets the .go source code using 'go vet'.
HaveDocker returns an error if docker is unavailable.
HaveDockerCompose returns an error if docker-compose is not found on the PATH.
HaveKubectl returns an error if kind is not found on the PATH.
ImageSelector returns the name of the selected builder image.
InDir specifies the base directory to use when cross-building.
InstallGoLicenser target installs go-licenser.
InstallGoTestTools installs additional tools that are required to run unit and integration tests.
InstallVendored uses go get to install a command from its vendored source.
IntegrationTestEnvVars returns the names of environment variables needed to configure connections to integration test environments.
IsInIntegTestEnv return true if executing inside the integration test environment.
IsUpToDate returns true if dst exists and is older based on modtime than all the sources.
ListMatchingEnvVars returns all the environment variables names that begin with prefix.
LoadLocalNamedSpec loads the named package spec from the packages.yml in the current directory.
LoadNamedSpec loads a packaging specification with the given name from the specified YAML file.
LoadSpecs loads the packaging specifications from the specified YAML files.
Mage executes mage targets in the specified directory.
MakePlatformAttributes returns a new PlatformAttributes.
MakeWindowsSysoFile generates a .syso file containing metadata about the executable file like vendor, version, copyright.
MinModules sets the minimum number of modules to require.
MustExpand expands the given Go text/template string.
MustExpandFile expands the Go text/template read from src and writes the output to dst.
MustFileConcat invokes FileConcat and panics if an error occurs.
MustFindReplace invokes FindReplace and panics if an error occurs.
MustUsePackaging will load a named spec from a named file, if any errors occurs when loading the specs it will panic.
NewDockerIntegrationRunner returns an integration runner configured only for docker.
NewIntegrationRunners returns the integration test runners discovered from the provided path.
NewPackageInstaller instantiates the package.
NewPlatformList returns a new BuildPlatformList based on given expression.
NewSemanticVersion return a new SemanticVersion parsed from string in the format of 'x.y' or 'x.y.z'.
OSSBeatDir returns the OSS beat directory.
Package packages the Beat for distribution.
PackageDeb packages a deb file.
PackageDocker packages the Beat into a docker image.
No description provided by the author
PackageRPM packages a RPM file.
PackageTarGz packages a gzipped tar file.
PackageZip packages a zip file.
Parallel runs the given functions in parallel with an upper limit set based on GOMAXPROCS.
ParallelCtx runs the given functions in parallel with an upper limit set based on GOMAXPROCS.
ParseVersion extracts the major, minor, and optional patch number from a version string.
ReadGLIBCRequirement returns the required glibc version for a dynamically linked ELF binary.
RegisterIntegrationTester registers a integration tester.
RegisterIntegrationTestSetupStep registers a integration step.
RunCmds runs the given commands and stops upon the first error.
Serially causes each cross-build target to be executed serially instead of in parallel.
SetBuildVariableSources sets the BuildVariableSources that defines where certain build data should be sourced from.
SetElasticBeatsDir sets the internal elastic beats dir to a preassigned value.
No description provided by the author
Tar compress a directory using tar + gzip algorithms.
TestBinaryGLIBCVersion checks GLIBC requirements.
TestLinuxForCentosGLIBC checks the GLIBC requirements of linux/amd64 and linux/386 binaries to ensure they meet the requirements for RHEL 6 which has glibc 2.12.
TestPackages executes the package tests on the produced binaries.
UseCommunityBeatPackaging configures the package target to build packages for a community Beat.
UseElasticAgentCorePackaging configures the package target to build binary packages for an Elastic Agent.
UseElasticAgentDemoPackaging configures the package target to build packages for an Elastic Agent demo purposes.
UseElasticAgentPackaging configures the package target to build packages for an Elastic Agent.
UseElasticBeatOSSPackaging configures the package target to build OSS packages.
UseElasticBeatPackaging configures the package target to build packages for an Elastic Beat.
UseElasticBeatWithoutXPackPackaging configures the package target to build packages for an Elastic Beat.
UseElasticBeatXPackPackaging configures the package target to build Elastic licensed (X-Pack) packages.
UseElasticBeatXPackReducedPackaging configures the package target to build Elastic licensed (X-Pack) packages for agent use.
VerifySHA256 reads a file and verifies that its SHA256 sum matches the specified hash.
WithModules enables modules folder contents testing.
WithModulesD enables modules.d folder contents testing.
WithMonitorsD enables monitors folder contents testing.
WithRootUserContainer allows root when checking user in container.
WithTarget specifies the mage target to execute inside the golang-crossbuild container.
XPackBeatDir returns the X-Pack beat directory.
# Constants
AgentCommitHashEnvVar allows to override agent commit hash string during packaging.
Config file types.
BeatsCrossBuildImage is the image used for crossbuilding Beats.
CGO is supported.
Project types.
No description provided by the author
Cross-build supported by golang-crossbuild.
List of possible package types.
Built by default on crossBuild and package.
List of possible package types.
Config file types.
ManifestUrlEnvVar is the name fo the environment variable containing the Manifest URL to be used for packaging agent.
Project types.
Config file types.
List of possible package types.
Config file types.
List of possible package types.
Project types.
List of possible package types.
# Variables
Common settings with defaults derived from files, CWD, and environment.
Common settings with defaults derived from files, CWD, and environment.
Common settings with defaults derived from files, CWD, and environment.
Common settings with defaults derived from files, CWD, and environment.
Common settings with defaults derived from files, CWD, and environment.
Common settings with defaults derived from files, CWD, and environment.
Common settings with defaults derived from files, CWD, and environment.
Common settings with defaults derived from files, CWD, and environment.
Common settings with defaults derived from files, CWD, and environment.
Common settings with defaults derived from files, CWD, and environment.
BuildPlatforms is a list of GOOS/GOARCH pairs supported by Go.
Common settings with defaults derived from files, CWD, and environment.
CrossBuildMountModcache mounts $GOPATH/pkg/mod into the crossbuild images at /go/pkg/mod, read-only, when set to true.
DefaultBeatBuildVariableSources contains the default locations build variables are read from by Elastic Beats.
DefaultCleanPaths specifies a list of files or paths to recursively delete.
Common settings with defaults derived from files, CWD, and environment.
ErrUnknownProjectType is returned if an unknown ProjectType value is used.
Common settings with defaults derived from files, CWD, and environment.
Common settings with defaults derived from files, CWD, and environment.
Common settings with defaults derived from files, CWD, and environment.
Common settings with defaults derived from files, CWD, and environment.
GoImportsImportPath controls the import path used to install goimports.
GoImportsLocalPrefix is a string prefix matching imports that should be grouped after third-party packages.
GoLicenserImportPath controls the import path used to install go-licenser.
Common settings with defaults derived from files, CWD, and environment.
Linux386 platform description for Linux386.
builders run on amd64 platform.
LinuxARM5 platform description for LinuxARM5.
LinuxARM6 platform description for LinuxARM6.
LinuxARM64 platform description for LinuxARM64.
LinuxARM7 platform description for LinuxARM7.
LinuxMIPS platform description for LinuxMIPS.
LinuxMIPS64LE platform description for LinuxMIPS64LE.
LinuxMIPSLE platform description for LinuxMIPSLE.
LinuxPPC64LE platform description for LinuxPPC64LE.
LinuxS390x platform description for LinuxS390x.
ManifestURL Location of the manifest file to package.
OSArchNames defines the names of architectures for use in packages.
Packages defines the set of packages to be built when the package target is executed.
Common settings with defaults derived from files, CWD, and environment.
PackagingFromManifest This value is set to tru when we have defined a ManifestURL variable.
Common settings with defaults derived from files, CWD, and environment.
Platforms contains the set of target platforms for cross-builds.
Common settings with defaults derived from files, CWD, and environment.
Common settings with defaults derived from files, CWD, and environment.
SelectedPackageTypes is the list of package types.
SemanticVersionRegex regex for semantic version.
Common settings with defaults derived from files, CWD, and environment.
StackEnvironment specifies what testing environment to use (like snapshot (default), latest, 5x).
Common settings with defaults derived from files, CWD, and environment.
Common settings with defaults derived from files, CWD, and environment.
# Structs
AppleSigningInfo indicate if signing is enabled and specifies the identities to use for signing applications and installers.
BuildArgs are the arguments used for the "build" target and they define how "go build" is invoked.
BuildPlatform represents a target platform for builds.
BuildVariableSources is used to explicitly define what files contain build variables and how to parse the values from that file.
ConfigFileParams defines the files that make up each config file.
ConfigParams defines config param template.
CopyModule contains a module name and the list of files or directories to copy recursively.
CopyTask copies a file or directory (recursively) and preserves the permissions.
DockerInfo contains information about the docker daemon.
DockerIntegrationTester returns build image.
GolangCrossBuilder executes the specified mage target inside of the associated golang-crossbuild container image for the platform.
GoTestArgs are the arguments used for the "go*Test" targets and they define how "go test" is invoked.
IntegrationRunner performs the running of the integration tests.
IntegrationTestStep setups mage to be ran.
OSPackageArgs define a set of package types to build for an operating system using the contained PackageSpec.
PackageDependency contains package dependency details.
PackageFile represents a file or directory within a package.
PackageInstaller contains package dependency.
PackageSpec specifies package metadata and the contents of the package.
PlatformAttributes contains all of the data that can be extracted from a BuildPlatform name.
PlatformDescription contains platform description.
ProjectRepoInfo contains information about the project's repo.
SemanticVersion contains version details.
SigningIdentity represents a key pair (public/private) that can be used for signing.
TestBinaryArgs are the arguments used when building binary for testing.
# Interfaces
IntegrationTester is interface used by the actual test runner.
IntegrationTestSetupStep is interface used by a step in the integration setup chain.
# Type aliases
BuildPlatformList is a list of BuildPlatforms that supports filtering.
ConfigFileType is a bitset that indicates what types of config files to generate.
CrossBuildOption defines an option to the CrossBuild target.
ImageSelectorFunc returns the name of the builder image.
IntegrationRunners is an array of multiple runners.
IntegrationTestSteps wraps all the steps and completes the in the order added.
PackageType defines the file format of the package (e.g.
PlatformFeature specifies features that are supported for a platform.
ProjectType specifies the type of project (OSS vs X-Pack).
TestPackagesOption defines a option to the TestPackages target.