package
6.4.2+incompatible
Repository: https://github.com/wangqinghuan/beats.git
Documentation: pkg.go.dev
# Functions
BeatDocBranch returns the documentation branch name associated with the Beat branch.
BeatVersion returns the Beat's version.
Build invokes "go build" to produce a binary.
BuildDate returns the time that the build started.
BuildGoDaemon builds the go-deamon binary.
Clean clean generated build artifacts.
CommitHash returns the full length git commit hash.
Copy copies a file or a directory (recursively) and preserves the permissions.
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.
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.
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.
FindReplace reads a file, performs a find/replace operation, then writes the output to the same file path.
ForPlatforms filters the platforms based on the given expression.
GenerateFieldsYAML generates a fields.yml file for a Beat.
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.
GolangCrossBuild invokes "go build" inside of the golang-crossbuild Docker environment.
GoVersion returns the version of Go defined in the project's .go-version file.
HaveDocker returns an error if docker is unavailable.
IsUpToDate returns true iff dst exists and is older based on modtime than all of the sources.
LoadNamedSpec loads a packaging specification with the given name from the specified YAML file.
LoadSpecs loads the packaging specifications from the specified YAML file.
Mage executes mage targets in the specified directory.
MakePlatformAttributes returns a new PlatformAttributes.
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.
NewPlatformList returns a new BuildPlatformList based on given expression.
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.
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.
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 explicitly sets the location of the Elastic Beats directory.
TestPackages executes the package tests on the produced binaries.
UseCommunityBeatPackaging configures the package target to build packages for a community Beat.
UseElasticBeatPackaging configures the package target to build packages for an Elastic Beat.
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.
WithTarget specifies the mage target to execute inside the golang-crossbuild container.
# Constants
CGO is supported.
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.
List of possible package 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.
BuildPlatforms is a list of GOOS/GOARCH pairs supported by Go.
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.
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.
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.
Platforms contains the set of target platforms for cross-builds.
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.
CopyTask copies a file or directory (recursively) and preserves the permissions.
DockerInfo contains information about the docker daemon.
GolangCrossBuilder executes the specified mage target inside of the associated golang-crossbuild container image for the platform.
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.
SigningIdentity represents a key pair (public/private) that can be used for signing.
# Type aliases
BuildPlatformList is a list of BuildPlatforms that supports filtering.
CrossBuildOption defines a option to the CrossBuild target.
PackageType defines the file format of the package (e.g.
PlatformFeature specifies features that are supported for a platform.
TestPackagesOption defines a option to the TestPackages target.