version

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2023 License: Apache-2.0 Imports: 8 Imported by: 3

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.

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 ferretdb_testcover tag and builds with race detector)
ferretdb_testcover - enables test coverage instrumentation
ferretdb_tigris    - enables Tigris backend

Debug builds

Debug builds of FerretDB behave differently in a few aspects:

  • Some internal errors cause crashes instead of being handled more gracefully.
  • Metrics are written to stderr on exit.
  • The default logging level is set to debug.

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
	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.

func Get

func Get() *Info

Get returns current build's info.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL