Documentation ¶
Overview ¶
Package version provides information about FerretDB version and build configuration.
Required files ¶
The following generated text files may be present in this (`build/version`) directory during building:
- version.txt (required) contains information about the FerretDB version in a format similar to `git describe` output: `v<major>.<minor>.<patch>`.
- commit.txt (optional) contains information about the source git commit.
- branch.txt (optional) contains information about the source git branch.
- package.txt (optional) contains package type (e.g. "deb", "rpm", "docker", etc).
Go build tags ¶
The following Go build tags (also known as build constraints) affect all builds of FerretDB, including embedded usage:
ferretdb_debug - enables debug build (see below; implied by builds with race detector) ferretdb_hana - enables Hana backend (alpha)
Debug builds ¶
Debug builds of FerretDB behave differently in a few aspects:
- Some values that are normally randomized are fixed or less randomized to make debugging easier.
- Some internal errors cause crashes instead of being handled more gracefully.
- Stack traces are collected more liberally.
- Metrics are written to stderr on exit.
- The default logging level is set to debug.
Debug builds are orthogonal to production releases, development releases, and local/host builds. For example, the host build could be made non-debug, and the production release, in theory, could be a debug build.
Currently, our production releases are non-debug builds, and all other builds and releases (development releases, all-in-one releases, local builds, etc.) are debug builds.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct { Version string Commit string Branch string Dirty bool Package string DebugBuild bool BuildEnvironment *types.Document // MongoDBVersion is fake MongoDB version for clients that check major.minor to adjust their behavior. MongoDBVersion string // MongoDBVersionArray is MongoDBVersion, but as an array. MongoDBVersionArray *types.Array }
Info provides details about the current build.