package
6.8.16+incompatible
Repository: https://github.com/tencentblueking/beats.git
Documentation: pkg.go.dev
# Functions
AddIntegTestUsage increments the use count for the integration test environment and prevents it from being stopped until the last call to StopIntegTestEnv().
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.
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.
BuildSystemTestBinary 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.
CheckNosetestsNotExecutable checks that none of the nosetests 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.
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.
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.
DefaultPythonTestIntegrationArgs returns a default set of arguments for running all integration tests.
DefaultPythonTestUnitArgs returns a default set of arguments for running all unit tests.
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.
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.
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.
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).
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.
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.
ImageSelector returns the name of the selected builder image.
InDir specifies the base directory to use when cross-building.
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.
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.
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.
NewGoTestSummary builds a new GoTestSummary.
NewPlatformList returns a new BuildPlatformList based on given expression.
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.
PythonAutopep8 executes autopep8 on all .py files in and below the CWD.
PythonNoseTest invokes "nosetests" via a Python virtualenv.
PythonVirtualenv constructs a virtualenv that contains the given modules as defined in the requirements file pointed to by requirementsTxt.
RunCmds runs the given commands and stops upon the first error.
RunIntegTest executes the given target inside the integration testing environment (Docker).
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.
StopIntegTestEnv will stop and removing the integration test environment (e.g.
TestPackages executes the package tests on the produced binaries.
UseCommunityBeatPackaging configures the package target to build packages for a community Beat.
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.
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.
WithTarget specifies the mage target to execute inside the golang-crossbuild container.
# Constants
BeatsCrossBuildImage is the image used for crossbuilding Beats.
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.
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.
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.
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.
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().
# 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.
GoTestArgs are the arguments used for the "goTest*" targets and they define how "go test" is invoked.
GoTestSummary is a summary of test results.
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 "nosetests" is invoked.
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.
ImageSelectorFunc returns the name of the builder image.
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.