package
8.15.2+incompatible
Repository: https://github.com/elastic/elastic-agent.git
Documentation: pkg.go.dev
# Functions
CheckPRVersion returns a fallback version if the version comes from a commit.
No description provided by the author
FetchBeatsBinary it downloads the binary and returns the location of the downloaded file If the environment variable BEATS_LOCAL_PATH is set, then the artifact to be used will be defined by the local snapshot produced by the local build.
FetchElasticArtifact fetches an artifact from the right repository, returning binary name, path and error.
FetchElasticArtifactForSnapshots fetches an artifact from the right repository, returning binary name, path and error.
FetchProjectBinary it downloads the binary and returns the location of the downloaded file If the environment variable BEATS_LOCAL_PATH is set, then the artifact to be used will be defined by the local snapshot produced by the local build.
FetchProjectBinaryForSnapshots it downloads the binary and returns the location of the downloaded file If the deprecated environment variable BEATS_LOCAL_PATH is set, then an error will be returned.
GetCommitVersion returns a version including the version and the git commit, if it exists.
GetElasticArtifactURL returns the URL of a released artifact, which its full name is defined in the first argument, from Elastic's artifact repository, building the JSON path query based on the full name It also returns the URL of the sha512 file of the released artifact.
GetElasticArtifactVersion returns the current version: 1.
GetFullVersion returns a version including the full version: version, git commit and snapshot.
GetSnapshotVersion returns a version including the snapshot version: version and snapshot.
GetVersion returns a version without snapshot or commit.
IsAlias checks if the passed version is an alias: ex.
NewArtifactSnapshotURLResolver creates a new resolver for artifacts that are currently in development, from the artifacts API.
NewArtifactURLResolver creates a new resolver for artifacts that are currently in development, from the artifacts API.
NewBeatsLegacyURLResolver creates a new resolver for Beats projects The Elastic Agent must use the project resolver.
NewBeatsURLResolver creates a new resolver for Beats projects The Elastic Agent must use the project resolver.
NewProjectURLResolver creates a new resolver for Elastic projects The Elastic Agent and Fleet Server must use the project resolver.
NewReleaseURLResolver creates a new resolver for downloads that are currently published in elastic.co/downloads.
RemoveCommitFromSnapshot removes the commit from a version including commit and SNAPSHOT.
SnapshotHasCommit returns true if the snapshot version contains a commit format.
UseBeatsCISnapshots check if CI snapshots should be used for the Beats, where the given SHA commit lives in the beats repository.
UseElasticAgentCISnapshots check if CI snapshots should be used for the Elastic Agent, where the given SHA commit lives in the elastic-agent repository.
# Constants
BeatsCIArtifactsBase name of the bucket used to store the artifacts generated on Beats CI.
FleetCIArtifactsBase name of the bucket used to store the artifacts generated on FLeet CI.
# Variables
BeatsLocalPath is the path to a local copy of the Beats git repository It can be overridden by BEATS_LOCAL_PATH env var.
GithubCommitSha1 represents the value of the "GITHUB_CHECK_SHA1" environment variable.
GithubRepository represents the value of the "GITHUB_CHECK_REPO" environment variable Default is "elastic-agent".
# Structs
ArtifactsSnapshotURLResolver type to resolve the URL of artifacts that are currently in development, from the artifacts API Takes the artifacts staged for inclusion in the next unified snapshot, before one is available.
No description provided by the author
ArtifactURLResolver type to resolve the URL of artifacts that are currently in development, from the artifacts API.
BeatsLegacyURLResolver resolver for legacy Beats projects, such as metricbeat, filebeat, etc The Elastic Agent must use the project resolver.
BeatsURLResolver resolver for Beats projects, such as metricbeat, filebeat, etc The Elastic Agent must use the project resolver.
ProjectURLResolver resolver for Elastic projects, such as elastic-agent, fleet-server, etc.
ReleaseURLResolver type to resolve the URL of downloads that are currently published in elastic.co/downloads.
# Interfaces
BucketURLResolver interface to resolve URL for artifacts in a bucket.
DownloadURLResolver interface to resolve URLs for downloadable artifacts.