# Functions
AddLicenseHeaders adds license headers to .go files.
AddPlatforms sets dependencies on others platforms.
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-deamon 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.
CheckDashboardsFormat checks the format of dashboards.
CheckLicenseHeaders checks license headers in .go files.
CheckPythonTestNotExecutable checks that none of the python test files are executable.
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.
Copy copies a file and preserves the permissions.
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.
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.
DefaultIncludeListOptions initializes IncludeListOptions struct with default values.
DefaultPythonTestIntegrationArgs returns a default set of arguments for running all integration tests.
DefaultPythonTestUnitArgs returns a default set of arguments for running all unit tests.
DefaultTestBinaryArgs returns the default arguments for building a binary for testing.
DefineModules checks which modules were changed and populates MODULE environment variable, so that CI would run tests only for the changed ones.
DockerChown chowns files generated during build.
DocsIndexFile specifies the index file (defaults to docs/index.asciidoc).
DocsName specifies the documentation's name (default to BeatName).
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.
ExportDashboard exports a dashboard from Kibana and writes it into the given module.
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.
FixDRADockerArtifacts is a workaround for the DRA artifacts produced by the package target.
Format adds license headers, formats .go files with goimports, and formats .py files with autopep8.
ForPlatforms filters the platforms based on the given expression.
GenerateAllInOneFieldsGo generates an all-in-one fields.go file.
GenerateDirModulesD generates a modules.d directory containing the <module>.yml.disabled files.
GenerateFieldsGo generates a .go file containing the fields.yml data.
GenerateFieldsYAML generates a fields.yml file for a Beat.
GenerateFieldsYAMLTo generates a YAML file containing the field definitions for the Beat.
GenerateIncludeListGo generates an include/list.go file containing imports for the packages that match the paths (or globs) in importDirs (optional) and moduleDirs (optional).
GenerateMetricbeatAllInOneFieldsGo generates an all-in-one fields.go file for metricbeat.
GenerateModuleFieldsGo generates a fields.go file containing a copy of the each module's field.yml data in a format that can be embedded in Beat's binary.
GenerateModuleIncludeListGo generates an include/list.go file containing a import statement for each module and dataset.
GenerateModuleReferenceConfig generates a reference config file and includes modules found from the given module dirs.
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.
GitDiff runs 'git diff' and writes the output to stdout.
GitDiffIndex returns a list of files that differ from what is committed.
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.
ImportDashboards imports dashboards to Kibana using the Beat setup command.
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.
Package packages the Beat for IronBank distribution.
IsInIntegTestEnv return true if executing inside the integration test environment.
IsUpToDate returns true iff dst exists and is older based on modtime than all of the sources.
KibanaDashboards collects the Kibana dashboards files and generates the index patterns based on the fields.yml file.
LibbeatDir returns the libbeat directory.
ListMatchingEnvVars returns all of 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.
LookVirtualenvPath looks for an executable in the path and it includes the virtualenv in the search.
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.
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.
PackageDMG packages the Beat into a .dmg file containing an installer pkg and uninstaller app.
PackageDocker packages the Beat into a docker image.
PackageKibanaDashboardsFromBuildDir reconfigures the packaging configuration to pull Kibana dashboards from build/kibana rather than _meta/kibana.generated.
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.
PythonAutopep8 executes autopep8 on all .py files in and below the CWD.
PythonTest executes python tests via a Python virtualenv.
PythonTestForModule executes python system tests for modules.
PythonVirtualenv constructs a virtualenv that contains the given modules as defined in the requirements file pointed to by requirementsTxt.
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.
Tar compress a directory using tar + gzip algorithms.
Tar compress a directory using tar + gzip algorithms but without adding the directory.
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
Config file types.
BeatsCrossBuildImage is the image used for crossbuilding Beats.
CGO is supported.
Project types.
Cross-build supported by golang-crossbuild.
List of possible package types.
Built by default on crossBuild and package.
List of possible package types.
List of possible package types.
Config file types.
FieldsAllYML specifies the path to the file containing the field data for the Beat from all license types.
FieldsYML specifies the path to the file containing the field data for the Beat (formerly this was ./fields.yml).
FieldsYMLRoot specifies the filename of the project's root level fields.yml file (this is being replaced by FieldsYML).
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.
CrossBuildMountModcache, if true, mounts $GOPATH/pkg/mod into the crossbuild images at /go/pkg/mod, read-only.
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.
Docs holds the utilities for building documentation.
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.
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.
builders run on amd64 platform.
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 true 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 Types is the list of package types.
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.
VirtualenvReqs specifies a list of virtualenv requirements files to be used when calling PythonVirtualenv().
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.
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.
DashboardObject is a dashboard.
DockerInfo contains information about the docker daemon.
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.
IncludeListOptions stores the options for IncludeList generation.
IntegrationRunner performs the running of the integration tests.
MageIntegrationTestStep setups mage to be ran.
OSPackageArgs define a set of package types to build for an operating system using the contained PackageSpec.
PackageFile represents a file or directory within a package.
PackageSpec specifies package metadata and the contents of the package.
PlatformAttributes contains all of the data that can be extracted from a BuildPlatform name.
ProjectRepoInfo contains information about the project's repo.
PythonTestArgs are the arguments used for the "python*Test" targets and they define how python tests are invoked.
SigningIdentity represents a key pair (public/private) that can be used for signing.
TestBinaryArgs are the arguments used when building binary for testing.
# Interfaces
FieldsBuilder is the interface projects to implement for building field data.
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 a option to the CrossBuild target.
DocsOption is a documentation generation option for controlling how the docs are built.
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.